/* CSS Reset and Variables */
:root {
    --primary-color: #8b7355; /* Warm gold/bronze */
    --primary-hover: #6e5b43;
    --secondary-color: #f4f1ea; /* Soft beige */
    --text-color: #2c2c2c; /* Charcoal */
    --text-light: #666;
    --bg-color: #ffffff;
    --border-color: #e0dcd3;
    --success-color: #4CAF50;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--bg-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.header-logo {
    height: 85px; /* Increased size */
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    /* Convert white to #8b7355 */
    filter: brightness(0) invert(52%) sepia(13%) saturate(1516%) hue-rotate(345deg) brightness(88%) contrast(85%);
}

.footer-logo-img {
    height: 110px; /* Increased size */
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    margin-bottom: 0.8rem;
    /* Convert white to #8b7355 */
    filter: brightness(0) invert(52%) sepia(13%) saturate(1516%) hue-rotate(345deg) brightness(88%) contrast(85%);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Main Container */
#app-container {
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

/* Highly Realistic CSS Curtains */
.theater-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    pointer-events: none;
    perspective: 1200px;
    overflow: hidden;
}

.theater-curtain {
    width: 50%;
    height: 100%;
    display: flex;
    transition: transform 3.5s cubic-bezier(0.65, 0, 0.1, 1);
    z-index: 5;
}

.theater-curtain.left-side {
    transform-origin: right top;
}

.theater-curtain.right-side {
    transform-origin: left top;
}

.theater-stage.open .theater-curtain.left-side {
    transform: scaleX(0.12); /* Gathered fabric at the edge */
}

.theater-stage.open .theater-curtain.right-side {
    transform: scaleX(0.12); /* Gathered fabric at the edge */
}

.theater-stage.open .pleat {
    box-shadow: inset 15px 0 35px rgba(0,0,0,0.9), inset -15px 0 35px rgba(0,0,0,0.9);
}

.pleat {
    flex: 1;
    height: 100%;
    transform-origin: top;
    /* Elegant silver fabric gradient */
    background: linear-gradient(to right, #a0a0a0 0%, #e0e0e0 40%, #f5f5f5 60%, #8c8c8c 100%);
    box-shadow: inset 2px 0 10px rgba(0,0,0,0.4), inset -2px 0 10px rgba(0,0,0,0.4);
    transition: box-shadow 3.5s ease, transform 3.5s cubic-bezier(0.65, 0, 0.1, 1);
    border-radius: 0 0 25px 25px;
    position: relative;
    border-left: 1px solid rgba(255,255,255,0.4);
    border-right: 1px solid rgba(0,0,0,0.2);
}

.pleat:nth-child(even) {
    transform: translateZ(-25px) scaleY(0.97);
    background: linear-gradient(to right, #8c8c8c 0%, #b3b3b3 30%, #cccccc 70%, #666666 100%);
    box-shadow: inset 5px 0 15px rgba(0,0,0,0.5), inset -5px 0 15px rgba(0,0,0,0.5);
}

.theater-stage.open .pleat:nth-child(even) {
    transform: translateZ(-50px) scaleY(0.97);
}

.curtain-rod-realistic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, #dcdcdc 0%, #ffffff 30%, #a0a0a0 100%);
    z-index: 6;
    box-shadow: 0 8px 25px rgba(0,0,0,0.8);
    border-bottom: 2px solid #666666;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 10, 20, 0.75), rgba(10, 10, 20, 0.75)), url('https://images.unsplash.com/photo-1513694203232-719a280e022f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}



.hero-content {
    z-index: 2;
    position: relative;
    animation: fadeInDown 1.5s ease-out;
}

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

/* Glitter Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #ffd700;
    opacity: 0;
    animation: twinkle 4s infinite linear;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 40%; left: 80%; animation-delay: 1s; }
.particle:nth-child(3) { top: 60%; left: 30%; animation-delay: 2.5s; }
.particle:nth-child(4) { top: 10%; left: 60%; animation-delay: 0.5s; }
.particle:nth-child(5) { top: 80%; left: 70%; animation-delay: 1.5s; }
.particle:nth-child(6) { top: 30%; left: 90%; animation-delay: 3s; }
.particle:nth-child(7) { top: 70%; left: 15%; animation-delay: 2s; }
.particle:nth-child(8) { top: 50%; left: 50%; animation-delay: 0.8s; }

@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5) translateY(0); }
    50% { opacity: 1; transform: scale(1.5) translateY(-20px); }
    100% { opacity: 0; transform: scale(0.5) translateY(-40px); }
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 1rem;
    margin: 3rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffd700; /* Gold */
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}


.hero-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

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

.btn-secondary:hover {
    background-color: #eaeaea;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    background-color: var(--bg-color);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 12px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-highlight {
    position: relative;
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #fff 80%, rgba(139,115,85,0.08) 100%);
}

.feature-highlight::before {
    content: '✦ مجاني';
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.feature-highlight:nth-child(5)::before {
    content: '✦ مجاني';
}

.feature-highlight:nth-child(6)::before {
    content: '✦ احترافي';
}


.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Steps Container */
.step-container {
    max-width: 800px;
    margin: 3rem auto;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.step-header {
    margin-bottom: 2rem;
    text-align: center;
}

.step-header h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

/* Forms & Options */
.form-group {
    margin-bottom: 2.5rem;
}

.form-group h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.option-card {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.option-card:hover {
    border-color: var(--primary-color);
    background: var(--secondary-color);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(139, 115, 85, 0.1);
}

.option-card h4 {
    margin-bottom: 0.5rem;
}

.option-card .price {
    color: var(--primary-color);
    font-weight: 700;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.color-circle:hover {
    transform: scale(1.1);
}

.color-circle.selected {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.3);
}

/* Measurements */
.info-alert {
    background-color: #e8f4fd;
    color: #0b5394;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-right: 4px solid #0b5394;
}

.measurements-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-group label {
    font-weight: 500;
}

.input-group input, .input-group textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.2);
}

.price-preview {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.price-preview.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.zipper-meter-selector {
    animation: fadeIn 0.3s ease;
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    background: rgba(139, 115, 85, 0.05);
}

/* Actions */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Checkout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.summary-list {
    list-style: none;
    margin-bottom: 1rem;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-top: 2px solid var(--border-color);
}

/* Success */
.success-message {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success-color);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.success-message h2 {
    margin-bottom: 1rem;
    color: var(--success-color);
}

.success-message p {
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .measurements-form, .checkout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .step-container {
        padding: 1.5rem;
        margin: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Lang Button */
.lang-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}
.lang-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.home-footer {
    background-color: #1a1a1a;
    color: #f4f1ea;
    padding: 4rem 5% 1rem;
    margin-top: 4rem;
}

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

.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #f4f1ea;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-color);
}

.contact-col p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

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

.fabric-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fabric-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.fabric-card h4 {
    margin: 15px 0 5px 0;
    color: var(--primary-color);
}

.fabric-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.fabric-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-5px);
}

.fabric-card.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 115, 85, 0.2);
}

.colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item > div:first-child, .stat-item > span {
    display: inline-block;
}

.stat-number-wrapper {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.color-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.color-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.color-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 115, 85, 0.2);
}

.color-option.selected .color-circle {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.track-card, .lining-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.track-card img, .lining-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.track-card-content, .lining-card-content {
    padding: 15px;
}

.track-card h4, .lining-card h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.track-card p, .lining-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.track-card:hover, .lining-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.track-card.selected, .lining-card.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 115, 85, 0.2);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a svg {
    width: 20px;
    height: 20px;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #999;
}

/* RTL/LTR Support adjustments */
html[dir="ltr"] .info-alert {
    border-right: none;
    border-left: 4px solid #0b5394;
}
