/* --- STYLE.CSS --- */
:root {
    --gold-1: #bf953f;
    --gold-2: #fcf6ba;
    --gold-3: #b38728;
    --gold-4: #fbf5b7;
    --gold-5: #aa771c;
    --bg-dark: #050505;
    --card-bg: rgba(12, 12, 12, 0.85);
    --text-color: #ffffff;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    background-image: url('background.png');
    background-position: center;
    background-attachment: fixed;
    background-size: 110%;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    transition: font-family 0.3s ease;
}

html[lang="fa"] body { font-family: 'Vazirmatn', sans-serif; }
html[lang="en"] body { font-family: 'Montserrat', sans-serif; }

.title-font { font-family: 'Cinzel', serif; }

.luxury-gold-text {
    background: linear-gradient(to right, var(--gold-1), var(--gold-2), var(--gold-5), var(--gold-2), var(--gold-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0px 1px 3px rgba(0,0,0,0.8);
}

.animated-title {
    background: linear-gradient(110deg, var(--gold-1) 20%, #4a3b10 40%, var(--gold-2) 50%, #4a3b10 60%, var(--gold-1) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: textShine 5s linear infinite;
}

@keyframes textShine { to { background-position: 200% center; } }
.animate-in { animation: fadeInUp 0.8s forwards; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }

/* HEADER */
header { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); position: fixed; top: 0; width: 100%; z-index: 1000; border-bottom: 1px solid rgba(212, 175, 55, 0.2); direction: ltr !important; }
.lang-switch { display: flex; gap: 15px; }
.lang-btn { background: transparent; border: 1px solid var(--gold-3); color: var(--gold-2); padding: 4px 12px; border-radius: 20px; cursor: pointer; font-size: 0.75rem; transition: var(--transition); font-family: 'Montserrat', sans-serif; font-weight: bold; }
.lang-btn.active, .lang-btn:hover { background: var(--gold-3); color: #000; box-shadow: 0 0 10px var(--gold-1); }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-text h2 { font-size: 1.4rem; letter-spacing: 2px; margin: 0; }
.logo-icon { font-size: 1.6rem; color: var(--gold-2); }

/* HERO */
.hero-section { text-align: center; padding-top: 140px; padding-bottom: 30px; }
.hero-title { font-size: 3.5rem; text-transform: uppercase; letter-spacing: 5px; margin-bottom: 10px; }
.hero-subtitle { font-size: 1.1rem; color: var(--gold-2); letter-spacing: 1px; font-weight: 300; }
.container { max-width: 96%; margin: 0 auto; padding: 20px; }
.grid-system { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 40px; }

/* STANDARD CARD */
.card { background: var(--card-bg); border: 1px solid rgba(179, 135, 40, 0.35); border-radius: 12px; padding: 15px; min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; transition: var(--transition); position: relative; overflow: hidden; backdrop-filter: blur(8px); }
.card:hover { transform: translateY(-5px); border-color: var(--gold-2); box-shadow: 0 10px 25px rgba(179, 135, 40, 0.2); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 8px; }
.card-header-left { display: flex; align-items: center; gap: 10px; }

/* --- ADDED FOR SOCIAL LINKS --- */
.card-social-links { display: flex; align-items: center; gap: 12px; }
.social-link { color: var(--gold-3); font-size: 1.1rem; transition: var(--transition); text-decoration: none; opacity: 0.85; }
.social-link:hover { color: var(--gold-2); transform: scale(1.15); opacity: 1; text-shadow: 0 0 10px rgba(252, 246, 186, 0.5); }
/* ------------------------------ */

.card-icon { color: var(--gold-2); font-size: 1.1rem; border: 1px solid var(--gold-3); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,0.5); }
.card-title { font-size: 0.9rem; font-weight: 800; color: var(--gold-2); text-transform: uppercase; letter-spacing: 0.5px; }
.card-desc { font-size: 0.8rem; line-height: 1.6; color: #ddd; flex-grow: 1; margin-bottom: 10px; text-align: justify; }
.product-visual { height: 180px; background: linear-gradient(135deg, #1a1a1a, #2a2a2a); border-radius: 8px; margin-bottom: 15px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.product-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: transform 0.4s ease; }
.card:hover .product-visual img { transform: scale(1.1); opacity: 1; }
.card-footer { display: flex; justify-content: flex-end; }
.action-btn { color: var(--gold-2); border: 1px solid var(--gold-3); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); font-size: 0.8rem; }
.card:hover .action-btn { background: var(--gold-3); color: #000; }

h2, .section-title { color: var(--gold-2); text-shadow: 0 2px 4px rgba(0,0,0,0.8); background: linear-gradient(to right, var(--gold-1), var(--gold-2), var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* === NEWS SLIDER STYLES === */
.news-slider-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    padding: 20px 0;
    margin-top: 20px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    direction: ltr !important; /* CRITICAL FIX: Ensures no empty space in RTL (Persian) */
}

.news-slider-track {
    display: flex;
    gap: 25px; /* GAP MUST MATCH JS CONFIG */
    width: max-content;
    height: 100%;
    cursor: grab;
    will-change: transform;

    /* CRITICAL FIX: Always LTR physically, visual RTL handled inside cards */
    direction: ltr !important;
    align-items: center;
}

.news-slider-track:active { cursor: grabbing; }

.news-card-modern {
    width: 300px; /* WIDTH MUST MATCH JS CONFIG */
    height: 100%;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--transition);
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: linear-gradient(145deg, #111, #000);
}

.news-card-modern:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--gold-2);
    box-shadow: 0 10px 40px rgba(191, 149, 63, 0.2);
}

/* Internal Visuals */
.news-bg-visual {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, #000, #1a1200, #3a2c0a, #000);
    background-size: 400% 400%; animation: liquidGold 15s ease infinite; opacity: 0.6; z-index: 1; transition: opacity 0.5s;
}
.news-card-modern:hover .news-bg-visual { opacity: 0.8; }

/* Text Content Overlay - Direction Aware */
.news-content-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
    z-index: 2; display: flex; flex-direction: column; gap: 8px;
}

html[lang="fa"] .news-content-overlay { text-align: right; direction: rtl; }
html[lang="en"] .news-content-overlay { text-align: left; direction: ltr; }

.news-card-date { font-size: 0.7rem; color: var(--gold-3); font-family: 'Montserrat', sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.news-card-title { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.4; margin-bottom: 5px; text-shadow: 0 2px 5px rgba(0,0,0,1); }

.news-card-icon {
    position: absolute; top: 15px; right: 15px; width: 35px; height: 35px;
    background: rgba(0,0,0,0.6); border: 1px solid var(--gold-3); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--gold-2); z-index: 3; backdrop-filter: blur(5px);
}
/* Flip icon position for Farsi */
html[lang="fa"] .news-card-icon { right: auto; left: 15px; }

/* Buttons */
.slider-control-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px;
    background: rgba(0,0,0,0.9); border: 1px solid var(--gold-2); border-radius: 50%;
    color: var(--gold-1); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; cursor: pointer; z-index: 20; transition: all 0.3s; opacity: 0.7;
}
.slider-control-btn:hover { opacity: 1; background: var(--gold-3); color: #000; box-shadow: 0 0 20px var(--gold-1); }
.slider-control-btn.prev { left: 10px; }
.slider-control-btn.next { right: 10px; }

/* TICKER */
.news-section { width: 100%; background: linear-gradient(to right, #000, #151515, #000); border-top: 1px solid var(--gold-3); border-bottom: 1px solid var(--gold-3); height: 50px; display: flex; align-items: center; overflow: hidden; margin-top: 10px; }
.news-track { display: flex; white-space: nowrap; width: max-content; will-change: transform; }
.news-item { display: inline-flex; align-items: center; padding: 0 40px; color: var(--gold-2); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.news-item i { margin: 0 8px; color: var(--gold-1); }
@keyframes scrollRightToLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scrollLeftToRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.ticker-rtl-anim { animation: scrollRightToLeft 40s linear infinite; }
.ticker-ltr-anim { animation: scrollLeftToRight 40s linear infinite; }
.news-section:hover .news-track { animation-play-state: paused; }

@media (max-width: 1200px) { .grid-system { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-system { grid-template-columns: 1fr; } header { padding: 10px 20px; } body { background-size: cover; } }

/* ========================================= */
/* === PRODUCT DETAILS PAGE STYLES === */
/* ========================================= */

/* --- GALLERY SECTION --- */
.product-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 80px;
}

.gallery-container {
    flex: 1;
    min-width: 350px;
}

.main-image-frame {
    width: 100%;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    position: relative;
}

.main-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.thumbs-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.thumb-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    object-fit: cover;
    opacity: 0.6;
}

.thumb-img:hover, .thumb-img.active {
    border-color: var(--gold-2);
    opacity: 1;
    transform: scale(1.05);
}

.product-intro-text {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-highlight {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 20px;
    text-align: justify;
    border-right: 3px solid var(--gold-3); /* RTL Default */
    padding-right: 20px;
}

html[lang="en"] .product-highlight {
    border-right: none;
    border-left: 3px solid var(--gold-3);
    padding-right: 0;
    padding-left: 20px;
}

/* --- ZIG-ZAG LAYOUT (Text | Image) --- */
.zigzag-section {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

/* Reverse for alternate rows */
.zigzag-section.reverse {
    flex-direction: row-reverse;
}

.zigzag-text {
    flex: 1;
    padding: 30px;
    background: linear-gradient(135deg, rgba(20,20,20,0.8), rgba(0,0,0,0.9));
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.zigzag-img-wrapper {
    flex: 1;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--gold-3);
    position: relative;
}

.zigzag-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.zigzag-section:hover .zigzag-img-wrapper img {
    transform: scale(1.1);
}

/* --- SPECS TABLE --- */
.specs-container {
    margin-bottom: 80px;
    overflow-x: auto;
}

.luxury-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Space between rows */
}

.luxury-table th {
    text-align: inherit;
    padding: 15px 30px;
    color: var(--gold-2);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--gold-3);
}

.luxury-table td {
    padding: 20px 30px;
    background: rgba(30, 30, 30, 0.6);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.luxury-table tr td:first-child {
    border-radius: 10px 0 0 10px;
    font-weight: bold;
    color: var(--gold-4);
    width: 30%;
}

.luxury-table tr td:last-child {
    border-radius: 0 10px 10px 0;
}

.luxury-table tr:hover td {
    background: rgba(212, 175, 55, 0.15);
}

/* --- CONTACT FOOTER CARD --- */
.contact-card-section {
    background: linear-gradient(45deg, #050505, #1a1200);
    border: 1px solid var(--gold-3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contact-item i {
    font-size: 2rem;
    color: var(--gold-2);
    margin-bottom: 15px;
    display: block;
}

.contact-item h5 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-item p {
    color: #ccc;
    font-family: 'Montserrat', sans-serif; /* Numbers look better */
}

/* Responsive */
@media (max-width: 900px) {
    .zigzag-section { flex-direction: column !important; }
    .zigzag-img-wrapper { width: 100%; height: 250px; }
    .main-image-frame { height: 300px; }
}

/* --- PRODUCT VISUALS (GRADIENTS) --- */

/* کلاس عمومی برای باکس‌های گرادینت */
.visual-placeholder {
    width: 100%;
    height: 100%;
    background-size: 400% 400%;
    animation: gradientFlow 10s ease infinite;
    border-radius: inherit; /* ارث‌بری گردی گوشه از والد */
}

/* انیمیشن حرکت نرم رنگ‌ها */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* تنوع رنگی برای گرادینت‌ها */
.grad-1 { background-image: linear-gradient(135deg, #000000, #1c1c1c, #4a3b10, #1c1c1c, #000000); }
.grad-2 { background-image: linear-gradient(45deg, #0f0f0f, #2b2b2b, #1a1a1a); }
.grad-3 { background-image: linear-gradient(to right, #000, #382e0e, #000); }
.grad-4 { background-image: linear-gradient(120deg, #111, #222, #111); }

/* --- GALLERY UPDATES --- */
.main-image-frame {
    /* حذف استایل‌های img قبلی اگر مزاحم هستند */
    background: #000; /* رنگ پایه */
}

.thumb-box {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    overflow: hidden; /* برای اینکه گرادینت بیرون نزند */
}

.thumb-box:hover, .thumb-box.active {
    border-color: var(--gold-2);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

/* --- ZIGZAG UPDATES --- */
.zigzag-img-wrapper {
    background: #050505; /* پس‌زمینه تیره */
}