/* ===================================
   CSS Variables & Reset
=================================== */
:root {
    /* Colors */
    --background: hsl(45, 30%, 96%);
    --foreground: hsl(220, 40%, 13%);
    --card: hsl(45, 40%, 98%);
    --muted: hsl(45, 20%, 90%);
    --muted-foreground: hsl(220, 20%, 40%);
    --border: hsl(45, 30%, 85%);
    
    --gold: hsl(45, 80%, 50%);
    --gold-light: hsl(45, 70%, 65%);
    --tile-blue: hsl(205, 65%, 35%);
    --tile-dark: hsl(205, 70%, 20%);
    --cream: hsl(45, 40%, 94%);
    --terracotta: hsl(15, 60%, 45%);
    
    /* Shadows */
    --shadow-elegant: 0 4px 20px -4px hsla(220, 40%, 13%, 0.1);
    --shadow-hover: 0 10px 40px -10px hsla(220, 40%, 13%, 0.15);
    --shadow-gold: 0 4px 30px -5px hsla(45, 80%, 50%, 0.3);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Radius */
    --radius: 0.75rem;
    --radius-lg: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    direction: rtl;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

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

ul {
    list-style: none;
}

/* ===================================
   Utilities
=================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gold {
    color: var(--gold);
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), hsl(35, 75%, 45%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: flex;
    }
}

/* ===================================
   Buttons
=================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Vazirmatn', sans-serif;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-ghost:hover {
    background-color: var(--muted);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--foreground);
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--muted);
}

.btn-hero {
    background-color: var(--gold);
    color: var(--tile-dark);
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-gold);
}

.btn-hero:hover {
    background-color: var(--gold-light);
    transform: translateY(-4px);
}

.btn-hero-outline {
    background: transparent;
    border: 2px solid hsla(45, 80%, 50%, 0.8);
    color: var(--gold);
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 2rem;
}

.btn-hero-outline:hover {
    background-color: hsla(45, 80%, 50%, 0.1);
    border-color: var(--gold);
}

.btn-full {
    width: 100%;
}

/* ===================================
   Header
=================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: hsla(45, 30%, 96%, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

@media (min-width: 768px) {
    .header-content {
        height: 5rem;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tile-dark);
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 1.5rem;
    }
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    color: var(--muted-foreground);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--foreground);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 1.25rem;
    height: 1.25rem;
    background-color: var(--gold);
    color: var(--tile-dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: flex;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.nav-mobile {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.nav-mobile.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.nav-mobile-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-mobile .nav-link {
    padding: 0.5rem 0;
}

.nav-mobile .btn {
    margin-top: 0.5rem;
}

/* ===================================
   Hero Section
=================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        hsla(205, 70%, 20%, 0.8), 
        hsla(205, 65%, 25%, 0.6),
        hsla(205, 70%, 20%, 0.9)
    );
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding-top: 5rem;
}

.hero-inner {
    max-width: 56rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: hsla(45, 80%, 50%, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid hsla(45, 80%, 50%, 0.3);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.hero-badge svg {
    width: 1rem;
    height: 1rem;
    color: var(--gold);
}

.hero-badge span {
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--cream);
    margin-bottom: 1.5rem;
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-description {
    color: hsla(45, 40%, 94%, 0.8);
    font-size: 1.125rem;
    max-width: 42rem;
    margin: 0 auto 2.5rem;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 32rem;
    margin: 4rem auto 0;
    animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.stat {
    text-align: center;
}

.stat-border {
    border-left: 1px solid hsla(45, 40%, 94%, 0.2);
    border-right: 1px solid hsla(45, 40%, 94%, 0.2);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gold);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 2.25rem;
    }
}

.stat-label {
    color: hsla(45, 40%, 94%, 0.6);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-mouse {
    width: 2rem;
    height: 3rem;
    border: 2px solid hsla(45, 40%, 94%, 0.3);
    border-radius: 9999px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5rem;
}

.scroll-dot {
    width: 0.375rem;
    height: 0.75rem;
    background-color: var(--gold);
    border-radius: 9999px;
    animation: shimmer 2s ease-in-out infinite;
}

/* ===================================
   Categories Section
=================================== */
.categories {
    padding: 5rem 0;
    background-color: var(--background);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .section-header-row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        text-align: right;
    }
}

.section-tag {
    color: var(--gold);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 1.875rem;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.category-card {
    position: relative;
    background-color: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-elegant);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.category-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay);
}

.category-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}

.category-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}

.category-icon-terracotta {
    background: linear-gradient(135deg, var(--terracotta), hsla(15, 60%, 45%, 0.7));
}

.category-icon-gold {
    background: linear-gradient(135deg, var(--gold), hsla(45, 80%, 50%, 0.7));
}

.category-icon-tile {
    background: linear-gradient(135deg, var(--tile-blue), hsla(205, 65%, 35%, 0.7));
}

.category-icon-gold-light {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.category-icon-terracotta-light {
    background: linear-gradient(135deg, hsla(15, 60%, 45%, 0.8), hsla(15, 60%, 45%, 0.5));
}

.category-icon-tile-light {
    background: linear-gradient(135deg, hsla(205, 65%, 35%, 0.8), hsla(205, 65%, 35%, 0.5));
}

.category-name {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.category-card:hover .category-name {
    color: var(--gold);
}

.category-desc {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* ===================================
   Products Section
=================================== */
.products {
    padding: 5rem 0;
    background-color: hsla(45, 20%, 90%, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay);
}

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

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-gold {
    background-color: var(--gold);
    color: var(--tile-dark);
}

.badge-green {
    background-color: hsl(142, 76%, 36%);
    color: white;
}

.badge-red {
    background-color: hsl(0, 84%, 60%);
    color: white;
}

.badge-tile {
    background-color: var(--tile-blue);
    color: white;
}

.badge-terracotta {
    background-color: var(--terracotta);
    color: white;
}

.badge-dark {
    background-color: var(--foreground);
    color: var(--background);
}

.product-actions {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.btn-wishlist {
    width: 2.25rem;
    height: 2.25rem;
    background-color: hsla(45, 30%, 96%, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-wishlist:hover {
    background-color: var(--gold);
    color: var(--tile-dark);
}

.btn-wishlist svg {
    width: 1rem;
    height: 1rem;
}

.product-cart-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem;
    background: linear-gradient(to top, hsla(220, 40%, 13%, 0.8), transparent);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-cart-overlay {
    opacity: 1;
}

.product-content {
    padding: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.star-icon {
    width: 1rem;
    height: 1rem;
    color: var(--gold);
    fill: var(--gold);
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.product-name {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.product-card:hover .product-name {
    color: var(--gold);
}

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

.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gold);
}

.price-original {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: line-through;
}

/* ===================================
   Footer
=================================== */
.footer {
    background-color: var(--tile-dark);
    color: var(--cream);
}

.newsletter {
    border-bottom: 1px solid hsla(45, 40%, 94%, 0.1);
}

.newsletter-content {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .newsletter-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.newsletter-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .newsletter-title {
        font-size: 1.875rem;
    }
}

.newsletter-desc {
    color: hsla(45, 40%, 94%, 0.6);
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .newsletter-form {
        width: auto;
    }
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background-color: hsla(45, 40%, 94%, 0.1);
    border: 1px solid hsla(45, 40%, 94%, 0.2);
    color: var(--cream);
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .newsletter-input {
        width: 18rem;
    }
}

.newsletter-input::placeholder {
    color: hsla(45, 40%, 94%, 0.4);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--gold);
}

.footer-main {
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-desc {
    color: hsla(45, 40%, 94%, 0.6);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: hsla(45, 40%, 94%, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--gold);
    color: var(--tile-dark);
}

.social-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-list a {
    color: hsla(45, 40%, 94%, 0.6);
    transition: var(--transition);
}

.footer-list a:hover {
    color: var(--gold);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-list svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-list span {
    color: hsla(45, 40%, 94%, 0.6);
}

.footer-bottom {
    border-top: 1px solid hsla(45, 40%, 94%, 0.1);
}

.footer-bottom-content {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: hsla(45, 40%, 94%, 0.4);
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--gold);
}

/* ===================================
   Animations
=================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
