/* Rustic Mango - Modern Attractive Design */

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

:root {
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Lato', sans-serif;
    --primary-color: #e71d36;
    --primary-dark: #b8152a;
    --primary-light: #fde8eb;
    --secondary-color: #ffffff;
    --accent-color: #8DB355;
    --text-dark: #000000;
    --text-light: #333333;
    --bg-light: #ffffff;
    --bg-white: #ffffff;
    --border-color: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

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

/* Header & Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

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

/* Desktop only — do not override modern-theme mobile navbar grid */
@media (min-width: 1025px) {
    .navbar .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
        position: relative;
    }

    .navbar .nav-menu {
        justify-self: start;
        grid-column: 1;
    }

    .navbar .nav-brand {
        justify-self: center;
        grid-column: 2;
        text-align: center;
    }

    .navbar .nav-actions {
        justify-self: end;
        grid-column: 3;
    }
}

.nav-brand a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-brand a:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.nav-brand .site-logo {
    display: block;
    height: 4rem;
    width: auto;
    max-width: min(320px, 55vw);
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    border-radius: 20px;
    margin: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #78350f;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #92400e;
    font-weight: 500;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headings */
section h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 1rem 0;
}

.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-light) 100%);
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-bottom: 2px solid var(--secondary-color);
    flex-shrink: 0;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    background: var(--bg-light);
}

.product-card:hover img {
    transform: scale(1.1) rotate(2deg);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.product-info {
    padding: 1.5rem;
}

.product-card .product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0.35rem;
    padding: 0.55rem 0.5rem 0.65rem;
    text-align: center;
}

.product-card h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1.3;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    line-height: 1.2;
    white-space: nowrap;
}

.price::before {
    content: none;
}

.price-sale {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: baseline;
    line-height: 1.2;
    white-space: nowrap;
}

.price-sale::before {
    content: none;
}

.price-original {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
    line-height: 1.2;
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.price-original::before {
    content: none;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 3rem 0;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.product-images {
    position: sticky;
    top: 100px;
    min-width: 0;
}

/* Legacy gallery selectors kept as no-ops; slider styles live in modern-theme.css */
.main-image,
.image-gallery {
    display: none;
}

.product-detail .product-info h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.product-info .product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.product-description {
    margin: 2rem 0;
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.05rem;
}

.product-description h2,
.product-description h3 {
    color: var(--text-dark);
    margin: 1.5rem 0 1rem;
}

.product-categories {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.category-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    margin: 0.5rem 0.5rem 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stock-instock {
    color: #137333;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: #E6F4EA;
    border-radius: 8px;
    display: inline-block;
}

.stock-outofstock {
    color: var(--accent-color);
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: #fee2e2;
    border-radius: 8px;
    display: inline-block;
}

/* Buttons — 3D black border */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 2rem;
    color: #000000;
    text-shadow: none;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #2a2a2a;
    border-top-color: #5a5a5a;
    border-left-color: #5a5a5a;
    border-right-color: #000000;
    border-bottom: 3px solid #000000;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    background-color: transparent;
    background-image: none;
    box-shadow:
        0 3px 0 #000000,
        0 5px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.btn::before,
.btn::after {
    content: none;
    display: none;
}

.btn:hover {
    color: #000000;
    background-color: transparent;
    background-image: none;
    border-color: #2a2a2a;
    border-top-color: #6b6b6b;
    border-left-color: #6b6b6b;
    border-right-color: #000000;
    border-bottom-color: #000000;
    transform: translateY(-2px);
    filter: none;
    box-shadow:
        0 5px 0 #000000,
        0 9px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
    filter: none;
    box-shadow:
        0 1px 0 #000000,
        0 2px 6px rgba(0, 0, 0, 0.35),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    background-color: transparent;
    background-image: none;
    color: #000000;
    border: 1px solid #2a2a2a;
    border-top-color: #5a5a5a;
    border-left-color: #5a5a5a;
    border-right-color: #000000;
    border-bottom: 3px solid #000000;
}

.view-all {
    text-align: center;
    margin: 3rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination.products-pagination {
    margin: 0;
}

.pagination .btn {
    padding: 0.75rem 1.5rem;
    min-width: 120px;
}

/* Featured Products Section */
.featured-products {
    margin: 4rem 0;
    padding: 3rem 0;
}

/* Related Products */
.related-products {
    margin: 3rem 0 1rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.related-products .section-header {
    margin-bottom: 1.25rem;
}

.related-products .section-title,
.related-products h2 {
    margin-bottom: 0;
}

/* Page Content */
.page-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-content h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.page-body {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.05rem;
}

.page-body h2,
.page-body h3 {
    color: var(--text-dark);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.page-body p {
    margin-bottom: 1.5rem;
}

.page-body ul,
.page-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.page-body li {
    margin: 0.5rem 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #fff;
    padding: 4rem 0 2rem;
    margin-top: 1rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    font-weight: 700;
    font-size: 1.3rem;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 0.75rem 0;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Keep logo truly centered in the mobile header bar */
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        position: relative;
        min-height: 3.75rem;
    }

    .navbar .mobile-menu-toggle {
        position: relative;
        z-index: 2;
        flex-shrink: 0;
    }

    .navbar .nav-brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        max-width: min(280px, 52vw);
        line-height: 0;
        text-align: center;
    }

    .navbar .nav-brand a,
    .navbar .nav-brand a:hover {
        display: flex;
        align-items: center;
        justify-content: center;
        transform: none;
        margin: 0;
        line-height: 0;
    }

    .navbar .nav-actions {
        position: relative;
        z-index: 2;
        margin-left: auto;
        flex-shrink: 0;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-images {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem;
        margin: 1rem 0 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .product-info {
        padding: 0.65rem 0.75rem;
    }

    .product-card .product-info {
        padding: 0.5rem 0.45rem 0.6rem;
    }

    .product-card h3 {
        font-family: var(--font-heading);
        min-height: 0;
        font-size: 0.8rem;
        font-weight: 700;
        margin-bottom: 0;
    }

    .product-price {
        gap: 0.2rem 0.35rem;
    }

    .price {
        font-size: 0.95rem;
    }

    .price::before {
        font-size: 0.8rem;
    }

    .price-sale {
        font-size: 1rem;
    }

    .price-sale::before {
        font-size: 0.85rem;
    }

    .price-original {
        font-size: 0.75rem;
        flex: 1 1 100%;
    }

    .shop-product-card .price-original,
    .shop-products-grid .price-original,
    .collection-products-grid .price-original {
        flex: 0 1 auto;
        width: auto;
    }

    .shop-product-card .product-info,
    .shop-products-grid .product-info {
        padding: 0.55rem 0.1rem 0.35rem;
        text-align: left;
        align-items: flex-start;
    }

    .product-detail {
        padding: 1.5rem;
    }
    
    .product-detail .product-info h1 {
        font-size: 1.05rem;
        font-weight: 600;
        line-height: 1.35;
        display: block;
        overflow: visible;
        margin-bottom: 0.65rem;
        word-break: break-word;
    }

    .product-detail .product-info .product-price {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0.35rem 0.5rem;
        padding: 0.85rem 1rem;
        margin: 1rem 0;
        text-align: center;
    }

    .product-detail .product-info .price,
    .product-detail .product-info .price-sale {
        font-size: 1.35rem;
    }

    .product-detail .product-info .price::before,
    .product-detail .product-info .price-sale::before {
        font-size: 1.05rem;
    }

    .product-detail .product-info .price-original {
        font-size: 0.95rem;
        flex: 0 0 auto;
        width: auto;
    }

    .product-detail .product-info .product-discount-label {
        margin-left: 0;
        font-size: 0.75rem;
        padding: 0.1rem 0.4rem;
        flex: 0 0 auto;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .page-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .product-info {
        padding: 0.5rem 0.6rem;
    }

    .product-card .product-info {
        padding: 0.45rem 0.4rem 0.55rem;
    }

    .product-card h3 {
        font-family: var(--font-heading);
        font-size: 0.75rem;
        font-weight: 700;
    }

    .price,
    .price-sale {
        font-size: 0.85rem;
    }

    .price::before,
    .price-sale::before {
        font-size: 0.72rem;
    }

    .price-original {
        font-size: 0.68rem;
    }

    .product-detail .product-info h1 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .product-detail .product-info .product-price {
        padding: 0.75rem 0.85rem;
        gap: 0.3rem 0.4rem;
    }

    .product-detail .product-info .price,
    .product-detail .product-info .price-sale {
        font-size: 1.25rem;
    }

    .product-detail .product-info .price::before,
    .product-detail .product-info .price-sale::before {
        font-size: 1rem;
    }

    .product-detail .product-info .price-original {
        font-size: 0.9rem;
        flex: 0 0 auto;
        width: auto;
    }

    .product-detail .product-info .product-discount-label {
        font-size: 0.7rem;
        padding: 0.08rem 0.35rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
