/**
 * Milan Smart Gear - Core Styles
 */

:root {
    --primary-green: #008037;
    --primary-navy: #001F54;
    --primary-red: #E10600;
    --accent-gold: #FFD700;

    --text-white: #FFFFFF;
    --text-light-gray: #E0E0E0;
    --text-charcoal: #282828;
    --text-gray: #75757a;

    --bg-white: #ffffff;
    --bg-light: #f5f5f7;
    --bg-footer: #001F54;
    /* Using Navy for footer */

    /* Card background used across site (forms, admin panels, widgets) */
    --bg-card: #ffffff;

    --shadow-soft: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 4px;

    --signature-gradient: linear-gradient(135deg, #008037, #001F54, #E10600);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-charcoal);
    line-height: 1.6;
}

.gradient-text {
    background: var(--signature-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-bg {
    background: var(--signature-gradient);
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding {
    padding: 2rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

/* share button icons (used on product page) */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid #ddd;
    box-shadow: var(--shadow-soft);
    color: var(--primary-green);
    text-decoration: none;
    margin-right: 0.75rem;
    transition: all 0.3s;
    font-size: 1rem;
}
.share-btn:hover {
    background: var(--signature-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--signature-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    animation: buttonPulse 1.5s infinite;
}

@keyframes buttonPulse {
    0% {
        transform: translateY(-2px) scale(1);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    50% {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 20px rgba(0, 128, 55, 0.3);
    }

    100% {
        transform: translateY(-2px) scale(1);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }
}

.auth-container {
    animation: formBounce 4s infinite ease-in-out;
}

@keyframes formBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid #e1e1e1;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 128, 55, 0.1);
}

.form-group input::placeholder {
    color: #b1b1b1;
}

/* Header & Nav */
header {
    background: white;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo img {
    height: 35px;
    display: block;
}

.search-container {
    flex: 1;
    display: flex;
    max-width: 600px;
    background: #f1f1f2;
    border-radius: var(--border-radius);
    padding: 2px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    outline: none;
    font-size: 0.9rem;
}

.search-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #006b2e;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
}

.nav-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 2px;
}

.nav-icon-item i {
    font-size: 1.3rem;
}

/* UI Elements */
.cart-count {
    display: flex;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-navy);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1100;
    transition: left 0.3s ease;
    padding: 2rem 1.5rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    font-weight: 600;
    border-bottom: 1px solid #f1f1f2;
    color: var(--text-charcoal);
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
    color: var(--primary-green);
}

/* Responsive Grid System */
.responsive-grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 1.5rem 0;
    }

    .mobile-toggle {
        display: block;
    }

    .filters-sidebar {
        display: none !important;
    }

    .search-container {
        display: none !important;
    }

    .nav-icons span {
        display: none;
    }

    .nav-icons {
        gap: 1rem;
    }

    /* Stack checkout/cart summaries */
    .responsive-grid-stack {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product card adjustments */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .product-card-jumia {
        padding: 0.3rem !important;
    }

    .product-card-jumia h3 {
        font-size: 0.75rem !important;
        height: 2rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .product-card-jumia .add-to-cart-btn {
        opacity: 1 !important;
        padding: 0.4rem !important;
        font-size: 0.7rem !important;
    }

    /* Header adjustments */
    .nav-container {
        gap: 1rem;
    }

    .logo img {
        height: 24px;
    }

    /* Table to Stack */
    .responsive-table {
        display: block;
        width: 100% !important;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        display: block;
        padding: 1rem 0;
        border-bottom: 2px solid var(--bg-light);
        position: relative;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 0 !important;
        text-align: right !important;
        border: none !important;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        font-size: 0.8rem;
        color: var(--text-gray);
        text-transform: uppercase;
        margin-right: 1rem;
    }

    .responsive-table td:first-child {
        display: block !important;
        text-align: left !important;
        padding: 0 0 1rem 0 !important;
    }

    .responsive-table td:first-child::before {
        display: none;
    }

    .responsive-table td:first-child>div:first-child {
        width: 80px !important;
        height: 80px !important;
    }
}


@media (max-width: 480px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }
}

/* Premium Toast Notifications */
.milan-toast {
    background: rgba(0, 31, 84, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 280px;
    border-left: 4px solid var(--primary-green);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

@media (max-width: 480px) {
    .milan-toast {
        min-width: calc(100vw - 2rem);
    }

    #toast-container {
        right: 1rem !important;
        left: 1rem !important;
        bottom: 1rem !important;
    }
}


.milan-toast.active {
    transform: translateX(0);
}

.milan-toast-icon {
    width: 35px;
    height: 35px;
    background: rgba(0, 128, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.milan-toast-content {
    flex: 1;
}

.milan-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.milan-toast-msg {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.milan-toast-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.milan-toast-btn:hover {
    color: #00a045;
}

/* Authentication Animated Background */
.auth-page {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
}

.auth-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    perspective: 1500px; /* deeper perspective for 3D depth */
}


.auth-container {
    position: relative;
    z-index: 10;
}

.floating-icon {
    position: absolute;
    opacity: 0.2;
    animation: float-around var(--anim-duration, 25s) infinite cubic-bezier(.36,.07,.19,.97);
    animation-direction: alternate;
    filter: blur(1px);
    transform-style: preserve-3d;
    background-clip: text;
    -webkit-background-clip: text;
    will-change: transform, opacity;
}

/* ensure images fill container and carry drop shadow for depth */
.floating-icon img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* tiny response on hover for interactivity */
.floating-icon:hover img {
    transform: scale(1.08) translateZ(10px);
    opacity: 0.3;
}

/* more nuanced path for a natural, slow drifting effect */
@keyframes float-around {
    0% {
        transform: translate3d(0,0,0) rotate3d(0,1,0,0deg) scale(1);
        opacity: 0.2;
    }

    20% {
        transform: translate3d(60px,-40px,80px) rotate3d(1,0,0,15deg) scale(1.05);
        opacity: 0.22;
    }

    40% {
        transform: translate3d(-80px,30px,-60px) rotate3d(0,1,1,30deg) scale(0.95);
        opacity: 0.18;
    }

    60% {
        transform: translate3d(40px,120px,100px) rotate3d(1,1,0,45deg) scale(1.1);
        opacity: 0.25;
    }

    80% {
        transform: translate3d(-120px,200px,-120px) rotate3d(0,1,0,60deg) scale(0.9);
        opacity: 0.2;
    }

    100% {
        transform: translate3d(0,0,0) rotate3d(0,0,1,0deg) scale(1);
        opacity: 0.2;
    }
}

/* Premium Realistic Color Gradients */
.icon-navy {
    background-image: linear-gradient(135deg, var(--primary-navy), #0a3d91);
    color: var(--primary-navy);
    filter: drop-shadow(5px 5px 15px rgba(0, 31, 84, 0.3));
}

.icon-green {
    background-image: linear-gradient(135deg, var(--primary-green), #00c853);
    color: var(--primary-green);
    filter: drop-shadow(5px 5px 15px rgba(0, 128, 55, 0.3));
}

.icon-red {
    background-image: linear-gradient(135deg, var(--primary-red), #ff5252);
    color: var(--primary-red);
    filter: drop-shadow(5px 5px 15px rgba(225, 6, 0, 0.3));
}

.icon-gold {
    background-image: linear-gradient(135deg, var(--accent-gold), #ffd600);
    color: var(--accent-gold);
    filter: drop-shadow(5px 5px 15px rgba(255, 215, 0, 0.3));
}

/* Enhanced variety for more icons */
.floating-icon:nth-child(1) {
    --anim-duration: 25s;
    font-size: 5.5rem;
    top: 5%;
    left: 5%;
    animation-delay: -1s;
    opacity: 0.18;
}

.floating-icon:nth-child(2) {
    --anim-duration: 32s;
    font-size: 4rem;
    top: 15%;
    left: 85%;
    animation-delay: -3s;
    opacity: 0.22;
}

.floating-icon:nth-child(3) {
    --anim-duration: 20s;
    font-size: 3.5rem;
    top: 75%;
    left: 10%;
    animation-delay: -5s;
    opacity: 0.15;
}

.floating-icon:nth-child(4) {
    --anim-duration: 28s;
    font-size: 4.8rem;
    top: 65%;
    left: 80%;
    animation-delay: -7s;
    opacity: 0.2;
}

.floating-icon:nth-child(5) {
    --anim-duration: 35s;
    font-size: 5rem;
    top: 35%;
    left: 40%;
    animation-delay: -9s;
    opacity: 0.19;
}

.floating-icon:nth-child(6) {
    --anim-duration: 22s;
    font-size: 3rem;
    top: 85%;
    left: 95%;
    animation-delay: -11s;
    opacity: 0.17;
}

.floating-icon:nth-child(7) {
    animation-duration: 30s;
    font-size: 4.2rem;
    top: 8%;
    left: 55%;
    animation-delay: -13s;
}

.floating-icon:nth-child(8) {
    animation-duration: 26s;
    font-size: 3.8rem;
    top: 50%;
    left: 15%;
    animation-delay: -15s;
}

.floating-icon:nth-child(9) {
    animation-duration: 34s;
    font-size: 4.5rem;
    top: 25%;
    left: 25%;
    animation-delay: -17s;
}

.floating-icon:nth-child(10) {
    animation-duration: 24s;
    font-size: 5rem;
    top: 70%;
    left: 50%;
    animation-delay: -19s;
}

.floating-icon:nth-child(11) {
    animation-duration: 29s;
    font-size: 3.2rem;
    top: 45%;
    left: 85%;
    animation-delay: -21s;
}

.floating-icon:nth-child(12) {
    animation-duration: 31s;
    font-size: 4.1rem;
    top: 90%;
    left: 30%;
    animation-delay: -23s;
}

.floating-icon:nth-child(13) {
    animation-duration: 27s;
    font-size: 3.6rem;
    top: 20%;
    left: 10%;
    animation-delay: -25s;
}

.floating-icon:nth-child(14) {
    animation-duration: 33s;
    font-size: 5.2rem;
    top: 10%;
    left: 70%;
    animation-delay: -27s;
}

.floating-icon:nth-child(15) {
    animation-duration: 23s;
    font-size: 3.4rem;
    top: 60%;
    left: 5%;
    animation-delay: -29s;
}

.floating-icon:nth-child(16) {
    animation-duration: 36s;
    font-size: 4.6rem;
    top: 80%;
    left: 60%;
    animation-delay: -31s;
}

/* Premium Countdown Timer Styles */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    perspective: 1000px;
}

.countdown-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.countdown-item:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.2);
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: 0.5s;
    pointer-events: none;
}

.countdown-item:hover::before {
    left: 100%;
    transition: 0.6s;
}

.radial-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radial-progress circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}

.radial-progress .bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.radial-progress .progress {
    stroke: var(--accent-gold);
    stroke-dasharray: 339.29;
    /* 2 * PI * 54 */
    stroke-dashoffset: 339.29;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 5px var(--accent-gold));
}

.countdown-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.countdown-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    margin-top: 5px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .countdown-timer {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .countdown-item {
        width: 100px;
        height: 100px;
    }

    .countdown-value {
        font-size: 1.8rem;
    }

    .countdown-label {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
}