/* 
   ELSALAM - Luxury Beauty & Skincare
   Feminine Luxury Aesthetic
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Amiri:wght@400;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary-pink: #FCE4EC;
    --soft-pink: #F8BBD0;
    --deep-pink: #F06292;
    --nude-beige: #FAF9F6;
    --rose-gold: #B76E79;
    --rose-gold-light: #E5B2B2;
    --white: #FFFFFF;
    --text-dark: #3E2723;
    --text-muted: #8D6E63;
    --luxury-shadow: 0 10px 30px rgba(183, 110, 121, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Amiri', sans-serif;
    background-color: var(--nude-beige);
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .luxury-font {
    font-family: 'Playfair Display', 'Amiri', serif;
}

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

@keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--primary-pink);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 4px;
    font-weight: 700;
    color: var(--rose-gold);
    text-transform: uppercase;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(252, 228, 236, 0.6), rgba(252, 228, 236, 0.2)), url('https://images.unsplash.com/photo-1556228720-195a672e8a03?auto=format&fit=crop&q=80&w=1920') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    background: rgba(255, 255, 255, 0.7);
    padding: 3rem;
    border-radius: 5px;
    border: 1px solid var(--rose-gold-light);
    max-width: 600px;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--rose-gold);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Discount Banner */
.offer-banner {
    background-color: var(--primary-pink);
    padding: 1.5rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 90%;
    border: 2px dashed var(--rose-gold);
    border-radius: 15px;
}

.offer-banner h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.offer-banner p {
    color: var(--rose-gold);
    font-weight: 600;
}

/* Products Section */
.products-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--rose-gold);
}

.category-group {
    margin-bottom: 4rem;
}

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

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

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

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--luxury-shadow);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--rose-gold-light);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.product-info {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    height: 3rem;
    overflow: hidden;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rose-gold);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn {
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', 'Amiri', sans-serif;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-align: center;
    font-size: 0.9rem;
}

.btn-buy {
    background-color: var(--rose-gold);
    color: var(--white);
}

.btn-buy.selected {
    background-color: var(--deep-pink);
    box-shadow: 0 0 15px var(--soft-pink);
}

.btn-details {
    background-color: transparent;
    border: 1.5px solid var(--rose-gold-light);
    color: var(--rose-gold);
}

.btn-details:hover {
    background-color: var(--primary-pink);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 800px;
    border-radius: 25px;
    padding: 2.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--rose-gold);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-modal-img {
    width: 100%;
    border-radius: 15px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.thumb-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb-scroll img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid transparent;
}

.thumb-scroll img.active {
    border-color: var(--rose-gold);
}

/* Order Summary section */
.summary-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 25px;
    box-shadow: var(--luxury-shadow);
    border: 1px solid var(--primary-pink);
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

.summary-total {
    border-top: 2px solid var(--primary-pink);
    padding-top: 1rem;
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--rose-gold);
}

.gift-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #E8F5E9;
    color: #2E7D32;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* Checkout Section */
.checkout-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--white);
    border-radius: 30px;
    box-shadow: var(--luxury-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--rose-gold-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--deep-pink);
    box-shadow: 0 0 10px rgba(183, 110, 121, 0.1);
}

.delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.delivery-btn {
    padding: 1rem;
    border: 1.5px solid var(--rose-gold-light);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--rose-gold);
    transition: var(--transition-smooth);
}

.delivery-btn.active {
    background: var(--rose-gold);
    color: var(--white);
}

.checkout-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--rose-gold);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 1rem;
}

.checkout-btn:hover {
    background: var(--deep-pink);
    transform: scale(1.02);
}

/* Social Buttons */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-btn.facebook { background-color: #1877F2; }
.social-btn.whatsapp { background-color: #25D366; }

.social-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

/* FAQ Section */
.faq-section {
    max-width: 1000px;
    margin: 5rem auto;
    padding: 0 1.5rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.faq-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.faq-header:hover {
    background: var(--primary-pink);
}

.faq-header.active {
    border-bottom: 1px solid var(--primary-pink);
    color: var(--rose-gold);
}

.faq-header .icon {
    transition: var(--transition-smooth);
    font-size: 0.8rem;
}

.faq-header.active .icon {
    transform: rotate(180deg);
}

.faq-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    background: var(--nude-beige);
}

.faq-content p {
    padding: 1.5rem;
}

.faq-content.active {
    max-height: 500px;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--primary-pink);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rose-gold);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--nude-beige);
}

::-webkit-scrollbar-thumb {
    background: var(--rose-gold-light);
    border-radius: 10px;
}

/* ============================================ */
/* IMPROVED ORDER SUMMARY BOX - RESPONSIVE FIX */
/* ============================================ */
.total {
    background: linear-gradient(135deg, #fffcfd 0%, #fff5f8 100%);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--soft-pink);
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(255, 126, 184, 0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px dashed rgba(255, 126, 184, 0.2);
    gap: 1rem;
}

.total-row:last-of-type {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-pink);
    border-bottom: none;
}

.total .small {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
}

.total .smalls {
    color: var(--rose-gold);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    word-break: break-word;
    text-align: left;
}

.total .big {
    color: var(--deep-pink);
    font-size: 1.6rem;
    font-weight: 800;
    text-align: left;
    word-break: break-word;
    line-height: 1.3;
}

.gift {
    color: var(--rose-gold);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    padding: 0.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--soft-pink);
    word-break: break-word;
}

@keyframes shine {
    0% { opacity: 0.9; }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.9; }
}

/* Mobile - keep everything on one line */
@media (max-width: 768px) {
    .checkout-section {
        padding: 1.5rem;
        margin: 1.5rem auto;
        width: 95%;
        border-radius: 20px;
    }
    
    .total {
        width: 100%;
        margin: 1.5rem 0;
        padding: 1.2rem;
        box-sizing: border-box;
    }
    
    .total .big { 
        font-size: 1.1rem;
    }
    
    .total .small { 
        font-size: 0.85rem;
    }
    
    .total .smalls {
        font-size: 1rem;
    }
    
    /* Keep everything on one line - NO STACKING */
    .total-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Extra small phones - still one line */
@media (max-width: 400px) {
    .total {
        padding: 1rem;
    }
    
    .total .big {
        font-size: 1.1rem;
    }
    
    .total .small {
        font-size: 0.75rem;
    }
    
    .total .smalls {
        font-size: 0.9rem;
    }
    
    .total-row {
        gap: 0.3rem;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .total {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .total .big {
        font-size: 1.6rem;
    }
}