/* ============================================
   ساری نگار - استایل ویجت محصولات
   White, Gold & Black Theme with 3D Effects
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --sn-gold-primary: #c9a033;
    --sn-gold-secondary: #f5c542;
    --sn-gold-dark: #96700d;
    --sn-bg: #ffffff;
    --sn-card-bg: #1a1a1a;
    --sn-card-bg-gradient: linear-gradient(145deg, #1a1a1a 0%, #111111 50%, #0d0d0d 100%);
    --sn-title-color: #fdf3d0;
    --sn-desc-color: rgba(255, 255, 255, 0.5);
    --sn-price-color: #f5c542;
    --sn-border-color: rgba(201, 160, 51, 0.15);
}

/* Section Container - White Gold Background */
.sn-products-section {
    position: relative;
    padding: 60px 0;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 10% 10%, rgba(201, 160, 51, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, rgba(201, 160, 51, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(253, 243, 208, 0.3) 0%, transparent 70%),
        linear-gradient(135deg, #ffffff 0%, #fefbf0 50%, #ffffff 100%);
}

/* Noise texture */
.sn-products-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.02;
    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)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Grid Pattern */
.sn-products-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(201, 160, 51, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 160, 51, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Particles Container */
.sn-particles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Mouse Follow Light */
.sn-mouse-light {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 160, 51, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease, top 0.1s ease;
}

/* ========== HEADER ========== */

.sn-section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.sn-header-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.sn-line {
    height: 1px;
    width: 120px;
}

.sn-line-right {
    background: linear-gradient(to left, #c9a033, transparent);
}

.sn-line-left {
    background: linear-gradient(to right, #c9a033, transparent);
}

.sn-star-ornament {
    color: #c9a033;
    animation: sn-ornamentFade 3s ease-in-out infinite;
}

.sn-section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Shimmer Text */
.sn-shimmer-text {
    background: linear-gradient(90deg, 
        #96700d 0%, 
        #c9a033 25%, 
        #b8860b 50%, 
        #f5c542 75%, 
        #c9a033 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sn-shimmer 3s linear infinite;
}

.sn-section-subtitle {
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(150, 112, 13, 0.6);
    margin-bottom: 24px;
}

.sn-ornament-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.sn-ornament-img {
    width: 200px;
    filter: brightness(0.7) sepia(1) saturate(5) hue-rotate(5deg);
    animation: sn-ornamentFade 3s ease-in-out infinite;
}

.sn-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.sn-dot {
    border-radius: 50%;
    background: #c9a033;
}

.sn-dot-sm { width: 6px; height: 6px; opacity: 0.4; }
.sn-dot-md { width: 8px; height: 8px; opacity: 0.6; }
.sn-dot-lg { width: 10px; height: 10px; opacity: 1; }

/* ========== PRODUCTS GRID ========== */

.sn-products-grid {
    display: grid;
    gap: 20px;
    position: relative;
    z-index: 2;
    perspective: 1200px;
}

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

@media (max-width: 1024px) {
    .sn-cols-3, .sn-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .sn-cols-2, .sn-cols-3, .sn-cols-4 { grid-template-columns: 1fr; }
    .sn-section-title { font-size: 1.75rem; }
    .sn-line { width: 60px; }
}

/* ========== PRODUCT CARD ========== */

.sn-product-card-wrapper {
    animation: sn-cardEnter 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

/* Uniform height card container */
.sn-product-card-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 460px;
}

.sn-product-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--sn-card-bg-gradient);
    border: 1px solid var(--sn-border-color);
    cursor: pointer;
    transition: box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 40px rgba(201, 160, 51, 0.08);
    height: 100%;
}

/* 3D Effect */
.sn-card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.sn-product-card:hover {
    box-shadow: 
        0 25px 60px rgba(201, 160, 51, 0.25),
        0 10px 30px rgba(201, 160, 51, 0.15),
        0 0 0 1px rgba(201, 160, 51, 0.1);
}

/* Glow Border on Hover */
.sn-product-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, transparent, #c9a033, transparent, #f5c542, transparent);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: sn-borderGlow 4s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 5;
}

.sn-product-card:hover::before {
    opacity: 1;
}

/* Glare Overlay */
.sn-glare-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    opacity: 0;
}

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

/* Light Beam */
.sn-light-beam {
    overflow: hidden;
}

.sn-light-beam::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 40%,
        rgba(201, 160, 51, 0.1) 45%,
        rgba(253, 243, 208, 0.2) 50%,
        rgba(201, 160, 51, 0.1) 55%,
        transparent 60%
    );
    transform: rotate(-45deg) translateY(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
    z-index: 11;
}

.sn-light-beam:hover::after {
    transform: rotate(-45deg) translateY(100%);
}

/* Light Rays inside card */
.sn-light-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(201, 160, 51, 0.08),
        transparent,
        rgba(201, 160, 51, 0.04),
        transparent
    );
    animation: sn-lightRays 15s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Badges */
.sn-badge {
    position: absolute;
    z-index: 20;
    top: 16px;
}

.sn-badge span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sn-badge-featured {
    right: 16px;
}

.sn-badge-featured span {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #f5c542;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sn-badge-sale {
    left: 16px;
}

.sn-badge-sale span {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Badge Shine */
.sn-badge-shine {
    overflow: hidden;
}

.sn-badge-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%) rotate(25deg);
    animation: sn-badgeShine 3s ease-in-out infinite;
}

/* Product Image - Fixed Height for Uniform Size */
.sn-product-image-wrapper {
    position: relative;
    display: block;
    height: 240px;
    overflow: hidden;
}

.sn-product-image-inner {
    position: absolute;
    inset: 0;
}

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

.sn-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fefbf0;
    color: rgba(201, 160, 51, 0.3);
}

.sn-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 40%);
    pointer-events: none;
}

/* Gold shine line at bottom of image */
.sn-image-gold-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c9a033, #f5c542, #c9a033, transparent);
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.sn-product-card:hover .sn-image-gold-line {
    opacity: 1;
}



/* Content - Flex for uniform height */
.sn-product-content {
    padding: 20px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sn-product-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--sn-title-color);
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sn-product-title:hover {
    color: #96700d;
}

.sn-product-content a {
    text-decoration: none;
}

.sn-product-desc {
    font-size: 0.875rem;
    margin-bottom: 16px;
    color: var(--sn-desc-color);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Spacer to push price to bottom */
.sn-spacer {
    flex: 1;
}

.sn-divider {
    width: 100%;
    height: 1px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, transparent, rgba(201, 160, 51, 0.4), transparent);
}

/* Footer: Price & View Product - Spaced from edges */
.sn-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 48px;
    padding: 0 16px;
}

.sn-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(201, 160, 51, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f5c542;
    border: 1px solid rgba(201, 160, 51, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
}

.sn-cart-button span {
    color: #f5c542;
}

.sn-cart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #f5c542;
}

/* Price Card - Spaced Glass Grey */
.sn-price-card {
    position: relative;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 160, 51, 0.15);
    border-radius: 14px;
    padding: 10px 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: all 0.4s ease;
    overflow: hidden;
}

.sn-price-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(201, 160, 51, 0.1) 50%, transparent 60%);
    animation: sn-priceCardShine 3s ease-in-out infinite;
    pointer-events: none;
}

.sn-price-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 160, 51, 0.5);
    box-shadow: 
        0 8px 25px rgba(201, 160, 51, 0.25),
        0 0 20px rgba(201, 160, 51, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.sn-old-price {
    font-size: 10px;
    text-decoration: line-through;
    color: var(--sn-price-color);
    opacity: 0.4;
    display: inline-block;
}

.sn-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.sn-currency {
    display: none;
}

.sn-product-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--sn-price-color);
}

.sn-price-glow {
    animation: sn-pricePulse 2s ease-in-out infinite;
}

/* Bottom Glow Line - Removed as requested */
.sn-bottom-glow {
    display: none;
}

/* ========== SHOP BUTTON ========== */

.sn-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.sn-button-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 40px;
}

.sn-button-line {
    height: 1px;
    width: 120px;
}

.sn-button-line-right {
    background: linear-gradient(to right, transparent, rgba(201, 160, 51, 0.6));
}

.sn-button-line-left {
    background: linear-gradient(to left, transparent, rgba(201, 160, 51, 0.6));
}

.sn-shop-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f5c542;
    text-decoration: none;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    border: 2px solid rgba(201, 160, 51, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(201, 160, 51, 0.1);
    transition: all 0.5s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.sn-shop-button:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(201, 160, 51, 0.2), inset 0 0 20px rgba(201, 160, 51, 0.1);
    transform: translateY(-4px) scale(1.03);
    color: #f5c542;
    border-color: rgba(201, 160, 51, 0.5);
}

.sn-button-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(201, 160, 51, 0.1) 45%, rgba(253, 243, 208, 0.15) 50%, rgba(201, 160, 51, 0.1) 55%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}

.sn-shop-button:hover .sn-button-shine {
    transform: translateX(100%);
}

.sn-button-icon,
.sn-button-text,
.sn-button-arrow {
    position: relative;
    z-index: 2;
}

.sn-shop-button:hover .sn-button-icon {
    transform: scale(1.1) translateX(-4px);
}

.sn-shop-button:hover .sn-button-arrow {
    transform: translateX(4px);
}

/* ========== SCROLL REVEAL ========== */

.sn-scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.sn-scroll-reveal.sn-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== ANIMATIONS ========== */

@keyframes sn-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes sn-ornamentFade {
    0%, 100% { opacity: 0.7; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.3); }
}

@keyframes sn-borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes sn-badgeShine {
    0% { transform: translateX(-100%) rotate(25deg); }
    100% { transform: translateX(400%) rotate(25deg); }
}

@keyframes sn-pricePulse {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(201, 160, 51, 0.3);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 15px rgba(201, 160, 51, 0.5), 0 0 30px rgba(201, 160, 51, 0.2);
        transform: scale(1.02);
    }
}

@keyframes sn-cardEnter {
    0% {
        opacity: 0;
        transform: translateY(60px) rotateX(10deg) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

@keyframes sn-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes sn-lightRays {
    0% { transform: rotate(0deg); opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { transform: rotate(360deg); opacity: 0.3; }
}

@keyframes sn-priceCardShine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20%, 20%); }
}

@keyframes goldFloat {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-100vh) translateX(50px) rotate(720deg); opacity: 0; }
}
