:root {
    --primary: #4f46e5;
    /* Vibrant Indigo */
    --secondary: #0ea5e9;
    /* Sky Blue */
    --accent: #f43f5e;
    /* Rose Pink */
    --background: #ffffff;
    /* Pure White */
    --surface: #f8fafc;
    /* Very Light Blue/Grey */
    --text: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border: #e2e8f0;
    /* Slate 200 */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --font-main: 'Outfit', sans-serif;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: var(--glass-border);
    padding: 1rem 0;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    position: relative;
    font-weight: 500;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background: var(--surface);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    top: calc(100% + 5px);
    /* Small gap */
    left: 0;
    z-index: 1000;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    border: var(--glass-border);
}

/* Hover Bridge: Invisible element to fill the gap between link and dropdown */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    /* Size of the gap */
    display: none;
}

.nav-dropdown:hover::after {
    display: block;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-content li a:hover {
    background: var(--surface);
    color: var(--secondary);
}

/* Nested Dropdowns */
.dropdown-content .nav-dropdown {
    width: 100%;
}

.dropdown-content .dropdown-content {
    top: 0;
    left: 100%;
    margin-top: -5px;
    transform: translateX(10px);
}

.dropdown-content .nav-dropdown:hover>.dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-content .nav-item i {
    float: right;
    font-size: 0.8rem;
    margin-top: 3px;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-icon-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.user-dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background: var(--background);
    min-width: 240px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1rem 0.5rem;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1000;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.user-dropdown:hover .user-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover Bridge for user dropdown */
.user-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 15px;
    display: none;
}

.user-dropdown:hover::after {
    display: block;
}

.user-info-header {
    padding: 0.75rem 1rem 1rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-transform: capitalize;
}

.user-role {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.user-dropdown-content li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 10px;
    transition: var(--transition);
}

.user-dropdown-content li a:hover {
    background: var(--surface);
    color: var(--primary);
}

.user-dropdown-content li a i {
    width: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown-content li a:hover i {
    color: var(--primary);
}

/* Nav Cart Icon Styles */
.nav-cart {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.4rem;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
}

.nav-cart:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--background);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.logout-link:hover {
    background: rgba(var(--accent-rgb, 244, 63, 94), 0.1) !important;
    color: var(--accent) !important;
}

.logout-link:hover i {
    color: var(--accent) !important;
}

.user-dropdown.open .user-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-actions-mobile {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--background);
    /* Invert for contrast */
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--background);
}

/* Landing Page / Hero */
.hero {
    padding: 7rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Angled clip-path instead of border-radius — eliminates the dark-on-white corner glow artifact */
    clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
    margin-bottom: 0;
    /* Compensate for clip-path visual cut */
    padding-bottom: 8rem;
    /* Rich layered background: dark mesh gradient */
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(79, 70, 229, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 60%, rgba(14, 165, 233, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 50% 0%, rgba(244, 63, 94, 0.07) 0%, transparent 60%),
        linear-gradient(160deg, #0f172a 0%, #1e1b4b 45%, #0c1445 100%);
    box-shadow: none;
}

/* Subtle animated grain overlay for texture */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.35;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* Hero buttons — override for dark background */
.hero .btn-primary {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
}

.hero .btn-primary:hover {
    background: #e0e7ff;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.hero .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
    color: white;
    transform: translateY(-3px);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (min-width: 993px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.product-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--surface);
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    bottom: 0;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* gap: 1rem; */
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cart-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.cart-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.product-category {
    font-size: 0.875rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}

.add-to-cart {
    margin-top: 1rem;
    width: 100%;
}

/* Star Rating */
.product-review-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

/* Bootstrap Icons — must be inline-block so glyph never collapses */
.star-rating i {
    display: inline-block;
    font-style: normal;
    line-height: 1;
    font-family: 'bootstrap-icons' !important;
}

.star-rating .bi-star-fill,
.star-rating .bi-star-half {
    color: #f59e0b;
    font-size: 0.9rem;
}

.star-rating .bi-star {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.review-count-text {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
}

/* Interactive Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.5rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--border);
    transition: var(--transition);
}

.star-rating-input label:hover,
.star-rating-input label:hover~label,
.star-rating-input input:checked~label {
    color: #fbbf24;
}

.star-rating-input label:hover i {
    transform: scale(1.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

/* Flash Messages */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Footer */
footer {
    background-color: #111827;
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 0 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}

.footer-col h3 {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    font-weight: 700;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #0d1117;
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Social icons in footer */
.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 200;
    }

    .mobile-menu-toggle .bar {
        width: 100%;
        height: 3px;
        background-color: var(--primary);
        border-radius: 10px;
        transition: var(--transition);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        padding: 6rem 2rem;
        transition: var(--transition);
        z-index: 150;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .nav-actions {
        display: none;
        /* Hide default actions on mobile */
    }

    .nav-actions.desktop-only {
        display: none;
    }

    .nav-actions-mobile {
        margin-top: 2rem;
        display: flex;
        gap: 1rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }

    .nav-actions-mobile {
        display: none;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

/* Shop experience and product grid styles have been moved to assets/css/shop.css */



.search-widget {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    padding: 3rem 0;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 120px;
}

.main-image-container {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
    aspect-ratio: 1/1;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumbs img:hover {
    border-color: var(--secondary);
}

.gallery-thumbs img.active {
    border-color: var(--primary);
}

.product-info-full h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.product-price-large {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.description-text {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.purchase-actions {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 2rem 0;
    }

    .product-gallery {
        position: static;
    }

    .product-info-full h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .product-detail {
        padding: 1rem 0;
    }

    .purchase-actions {
        padding: 1.25rem;
    }

    .purchase-actions .btn {
        width: 100%;
    }

    .gallery-thumbs img {
        width: 60px;
        height: 60px;
    }
}

/* Profile Page */
.profile-page,
.settings-page {
    padding: clamp(2rem, 8vh, 4rem) 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    margin-top: 2rem;
    align-items: start;
}

.profile-card,
.settings-card {
    background: var(--surface);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Settings Page */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/ *   - - -   S e a r c h   C S S   - - -   * /     