/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Inter:wght@300;400;600&display=swap');

:root {
    /* Colors */
    --color-bg: #f9f9f9;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-primary: #8C7356;
    /* Elegant Gold/Bronze */
    --color-primary-dark: #6b563d;
    --color-secondary: #2c2c2c;
    --color-white: #ffffff;
    --color-border: #e0e0e0;

    /* Spacing */
    --container-padding: 2rem;
    --max-width: 1400px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography depends on Language Direction in HTML */
html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

html[lang="en"] body {
    font-family: 'Inter', sans-serif;
}

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

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: var(--transition);
}

header.scrolled .nav-wrapper {
    height: 70px;
}

.logo img {
    height: 130px;
    width: auto;
    transition: var(--transition);
    border-radius: 12px;
}

header.scrolled .logo img {
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:not(.lang-switch)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    /* Use left/right instead of inset-inline for safer anims, or use scale */
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

/* RTL Support for Nav Hover */
html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

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

.lang-switch {
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 50px;
}

.lang-switch:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 90px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.hero-content {
    width: 100%;
    z-index: 10;
}

.hero-text {
    max-width: 700px;
    /* In RTL, we might want it on the right? */
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    border: 2px solid var(--color-primary);
    cursor: pointer;
}

.btn:hover {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
    position: relative;
    z-index: 5;
}

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

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.about-img img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 20px 20px 0px var(--color-primary);
}

/* RTL Shadow Flip */
html[dir="rtl"] .about-img img {
    box-shadow: -20px 20px 0px var(--color-primary);
}

/* Products Section */
.products {
    background: var(--color-white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    height: 400px;
}

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

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

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    transform: translateY(0);
    opacity: 1;
}

.product-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Features/Quality Section (Parallax) */
.quality {
    background-color: var(--color-secondary);
    color: white;
    text-align: center;
    padding: 120px 0;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.quality-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.quality-item p {
    color: #ccc;
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info .item {
    margin-bottom: 30px;
}

.contact-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.contact-form {
    flex: 1.5;
    background: var(--color-white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Footer */
footer {
    background: var(--color-secondary);
    color: white;
    padding: 50px 0;
    text-align: center;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
        /* simple hide for now */
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .about-grid,
    .contact-wrapper,
    .quality-grid {
        grid-template-columns: 1fr;
    }

    .header .btn {
        display: none;
    }
}

/* Animations Trigger Class */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Product Details Page Specific Styles
   ========================================= */

.prod-header {
    height: 70vh;
    position: relative;
    background: #000;
}

.prod-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.prod-title-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    z-index: 5;
}

.prod-title-box h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.prod-title-box p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--color-primary);
    transition: color 0.3s;
}

.back-link:hover {
    color: white;
}

.main-details {
    padding: 80px 0;
    background: var(--color-white);
}

.specs-box {
    background: #fdfdfd;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border);
}

.specs-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list li::before {
    content: '•';
    color: var(--color-primary);
    font-size: 2rem;
    margin-inline-end: 15px;
    line-height: 0;
}

/* Product Gallery */
.gallery-section {
    padding: 80px 0;
    background: #f4f4f4;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Related Products */
.related-section {
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.related-title {
    text-align: center;
    margin-bottom: 50px;
}

/* ... existing success modal ... */

/* Human Verification Widget */
.captcha-container {
    background: #f9f9f9;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    height: 0;
    padding: 0;
    overflow: hidden;
    margin: 0;
    border: none;
}

.captcha-container.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    height: auto;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #dcdcdc;
    overflow: visible;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    background: white;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.captcha-checkbox:hover {
    border-color: #a0a0a0;
}

.captcha-checkbox.loading {
    border-color: transparent;
    background: transparent;
}

.captcha-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.captcha-checkbox.loading .captcha-spinner {
    display: block;
}

.captcha-label {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.captcha-verified {
    display: none;
    color: #009e55;
    font-size: 18px;
    font-weight: bold;
}

.captcha-checkbox.verified {
    border: none;
    background: transparent;
}

.captcha-checkbox.verified .captcha-verified {
    display: block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.success-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 400px;
}

.success-modal.active .modal-content {
    transform: scale(1);
}

/* Checkmark Animation */
.checkmark-circle {
    width: 80px;
    height: 80px;
    position: relative;
    display: inline-block;
    vertical-align: top;
    border-radius: 50%;
    border: none;
    margin-bottom: 20px;
}

.checkmark-svg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #8C7356;
    /* Gold/Bronze */
    stroke-miterlimit: 10;
    margin: 0 auto 20px;
    box-shadow: inset 0px 0px 0px #8C7356;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle-path {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #8C7356;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 5px #8C7356;
    }
}

.modal-content h3 {
    color: var(--color-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

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

.modal-close-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--color-secondary);
}