/* ============================================
   SHOPLYHUB — Master Stylesheet
   Premium Global Fashion Store
   ============================================ */

/* CSS Variables */
:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #c9a962;
    --accent-light: #ddc48b;
    --accent-dark: #a88a4a;
    --text: #2d2d2d;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-soft: #f9fafb;
    --bg-warm: #fdf8f0;
    --border: #e5e7eb;
    --success: #10b981;
    --sale: #ef4444;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
}

/* Section */
.section {
    padding: 80px 0;
}

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-desc {
    font-size: 16px;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--primary);
}
.btn-light:hover {
    background: var(--accent);
    color: var(--primary);
}

.btn-large { padding: 16px 36px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    color: var(--accent);
    font-size: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: rgba(201, 169, 98, 0.08);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 2px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.dropdown-menu a:hover {
    background: var(--bg-soft);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search */
.search-wrap {
    position: relative;
}

.search-wrap input {
    width: 200px;
    padding: 8px 40px 8px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-family: var(--font-body);
    background: var(--bg-soft);
    transition: var(--transition);
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--accent);
    width: 250px;
    background: #fff;
}

.search-wrap button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0.6;
    transition: var(--transition);
}

.search-wrap button:hover { opacity: 1; }

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.search-results.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: var(--transition);
}

.search-item:hover { background: var(--bg-soft); }

.search-img {
    width: 40px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.search-info {
    display: flex;
    flex-direction: column;
}

.search-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.search-price {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* Currency Selector */
.currency-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: var(--font-body);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.currency-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Cart Button */
.cart-btn {
    position: relative;
    padding: 8px;
    font-size: 20px;
}

.cart-btn .cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: #fff;
        padding: 24px;
        gap: 8px;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: var(--radius);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 16px;
        display: none;
    }

    .dropdown:hover .dropdown-menu { display: block; }

    .mobile-toggle { display: flex; }

    .nav-actions .search-wrap,
    .nav-actions .currency-select { display: none; }
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   PRODUCT GRID & CARDS
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.sale {
    background: var(--sale);
    color: #fff;
}
.product-badge.new {
    background: var(--accent);
    color: var(--primary);
}
.product-badge.best {
    background: #fff;
    color: var(--accent-dark);
}

/* Product Actions (hover) */
.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.btn-wishlist {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.btn-wishlist:hover {
    background: var(--accent);
    color: var(--primary);
}

/* Product Info */
.product-info {
    padding: 16px;
}

.product-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.product-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin: 6px 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name:hover {
    color: var(--accent-dark);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.stars { color: var(--accent); letter-spacing: 1px; }
.review-count { color: var(--text-muted); }

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-cart-btn {
    width: 100%;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: var(--bg-warm);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--primary);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-col p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-logo .logo-text {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.payment-icons {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter {
    background: var(--primary);
    padding: 60px 0;
    text-align: center;
    color: #fff;
}

.newsletter h3 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 12px;
}

.newsletter p {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    max-width: 450px;
    margin: 0 auto;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    outline: 2px solid var(--accent);
}

.newsletter-note {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 12px;
}

@media (max-width: 480px) {
    .newsletter-form { flex-direction: column; }
}

/* ============================================
   UTILITIES
   ============================================ */
.section-cta {
    text-align: center;
    margin-top: 48px;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}

.no-products p {
    color: var(--text-light);
    margin-bottom: 20px;
}
