/* الألوان الأساسية */
:root {
    --primary-color: #5bc0de;
    /* لون سماوي/لبني أساسي */
    --secondary-color: #46b8da;
    /* درجة أغمق قليلاً للهوفر */
    --accent-color: #31b0d5;
    /* درجة للضغط أو التأكيد */
    --text-dark: hsl(0, 0%, 0%);
    --text-light: #ffffff;
    --bg-light: #fcffff;
    /* خلفية فاتحة */
    --bg-dark: #020202;
    --border-color: #e0e0e0;
}

/* الخطوط العامة */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=El+Messiri:wght@400;700&display=swap');

html {
    font-size: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    /* دعم اللغة العربية */
    text-align: right;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الأزرار العامة */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

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

/* Header */
header {
    background-color: rgba(252, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-dark);
    padding: 10px 0;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 2000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-search {
    flex: 1 1 250px;
    max-width: 400px;
    margin: 0 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f0f4f8;
    border-radius: 30px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(91, 192, 222, 0.2);
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex-grow: 1;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0 10px;
    width: 100%;
}

.search-box i {
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
}

.header-logo .logo-img {
    height: 60px;
    max-width: 100%;
    object-fit: contain;
}

.logo {
    font-family: 'El Messiri', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: 1px;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between !important;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid rgba(224, 224, 224, 0.5);
}

.auth-links {
    display: flex;
    gap: 15px;
}

.auth-links a {
    background-color: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.auth-links a:hover {
    background-color: #b54a32;
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

header nav ul li {
    margin-right: 0;
}

header nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    right: 0;
    transition: width 0.3s ease;
    border-radius: 2px;
}

header nav ul li a:hover::after {
    width: 100%;
}

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

.categories-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-light);
    background: var(--primary-color);
    padding: 6px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

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

.cart-icon {
    position: relative;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--text-light);
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x800/f7a73a/ffffff?text=Delicious+Desserts') center/cover no-repeat;
    color: var(--text-light);
    text-align: center;
    padding: 150px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero-section h2 {
    font-family: 'El Messiri', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Products Section */
.products-section {
    padding: 30px 0 20px 0;
    background-color: var(--bg-light);
}

.products-section h2 {
    text-align: center;
    font-family: 'El Messiri', serif;
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: var(--secondary-color);
    position: relative;
}

.products-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 15px;
}

.product-card {
    background-color: #eff4f6;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-info p {
    color: hsl(0, 55%, 4%);
    font-size: 0.95rem;
    margin-bottom: 15px;
    height: 60px;
    /* لتثبيت ارتفاع الوصف */
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.product-card .add-to-cart-btn {
    background-color: var(--accent-color);
    width: 100%;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.product-card .add-to-cart-btn:hover {
    background-color: #b54a32;
}


/* Cart Drawer */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}

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

.cart-modal.active .cart-content {
    right: 0;
}

.cart-content {
    background-color: #f8f8f8;
    padding: 20px 15px;
    border-radius: 0;
    width: 100%;
    max-width: 260px;
    position: absolute;
    top: 0;
    right: -260px;
    height: 100vh;
    max-height: 100vh;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-content h3 {
    font-family: 'El Messiri', serif;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    text-align: center;
}

.close-button {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: hsl(0, 6%, 51%);
}

.cart-items {
    margin-bottom: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 10px;
}

.item-info-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.item-details {
    margin-bottom: 8px;
}

.item-details h4 {
    margin: 0 0 3px 0;
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.item-details p {
    margin: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: bold;
}

.item-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-quantity {
    display: flex;
    align-items: center;
}

.item-quantity button {
    background-color: #f0f0f0;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.item-quantity button:hover {
    background-color: #e0e0e0;
}

.item-quantity span {
    margin: 0 8px;
    font-weight: bold;
    font-size: 0.95rem;
}

.remove-item {
    background-color: transparent;
    color: #ff4d4d;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 4px;
}

.remove-item:hover {
    color: #cc0000;
}

.cart-summary {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.cart-summary p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.cart-summary .cart-total {
    color: var(--primary-color);
}

.cart-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 15px;
}

.checkout-btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 1rem;
    background-color: var(--secondary-color);
    text-align: center;
}

.checkout-btn:hover {
    background-color: var(--accent-color);
}

.back-btn {
    display: block;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 15px;
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.continue-shopping-btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 1rem;
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    text-align: center;
}

.continue-shopping-btn:hover {
    background-color: #e0e0e0;
    color: var(--primary-color);
}


footer {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    color: #fff;
    padding: 20px 0;
    margin-top: 10px;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    text-align: right;
    flex-wrap: wrap;
}

.footer-about h3 {
    font-family: 'El Messiri', serif;
    font-size: 2.2rem;
    color: #8be1f8;
    margin-bottom: 20px;
}

.footer-about p {
    color: #a8d0df;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-icon {
    width: 38px;
    height: 38px;
    background-color: #8be1f8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    background-color: #fff;
}

.footer-links h4 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.05rem;
}

.footer-links ul li a::before {
    content: '\f0d9'; /* FontAwesome angle-left icon pointing towards text */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #8be1f8;
    margin-left: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: 15px;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #aaa;
    font-size: 1rem;
}

.payment-methods {
    display: flex;
    gap: 15px;
    font-size: 1.8rem;
    color: #fff;
    opacity: 0.8;
}

.payment-methods i:hover {
    opacity: 1;
    color: #8be1f8;
}

@media (max-width: 768px) {
    .footer-bottom-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #aaa;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-methods i {
    font-size: 2rem;
    color: #fff;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .footer-grid > div {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        text-align: right;
        gap: 15px;
    }
    .footer-grid > div {
        flex: 1 1 45%;
        width: auto;
    }
    .footer-grid .footer-about {
        flex: 1 1 100%;
        margin-top: 10px;
    }
    .footer-links ul li {
        justify-content: flex-start;
    }
    .footer-links ul li a {
        justify-content: flex-start;
    }
    .footer-social {
        justify-content: flex-start;
    }
    .footer-bottom .container {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    header .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .header-logo {
        order: 1; /* Logo on the right */
        margin: 0;
    }

    .header-logo .logo-img {
        height: 45px;
    }
    
    .header-actions {
        order: 2; /* Actions on the left */
        width: auto;
        justify-content: flex-end;
    }

    .header-search {
        order: 3; /* Search on new line */
        width: 100%;
        max-width: 100%;
        margin: 5px 0 0 0;
    }

    .header-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-top: 10px;
        margin-top: 5px;
    }
    
    .auth-links {
        width: 100%;
        justify-content: center;
    }

    header nav {
        width: 100%;
    }

    header nav ul {
        justify-content: center;
        flex-wrap: wrap; /* Allows "Contact" and other links to wrap instead of disappearing */
        gap: 8px;
        width: 100%;
        overflow: visible;
    }

    header nav ul li {
        margin: 0;
        flex-shrink: 0;
    }

    header nav ul li a, .categories-btn, .flavors-btn {
        font-size: 0.85rem !important;
        padding: 4px 8px !important;
        white-space: nowrap;
    }

    .hero-section {
        padding: 100px 0;
    }

    .hero-section h2 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .products-section h2 {
        font-size: 2.2rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-card img {
        height: 150px;
    }

    .product-info {
        padding: 10px;
    }
    
    .product-info h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .product-info p {
        font-size: 0.8rem;
        height: 48px;
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    
    .product-card .add-to-cart-btn {
        padding: 10px;
        font-size: 0.95rem;
    }

    .cart-content {
        width: 100%;
        padding: 20px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
    }

    .cart-item img {
        margin-left: 0;
        margin-bottom: 15px;
    }

    .item-details {
        width: 100%;
        margin-bottom: 10px;
    }

    .item-quantity {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }

    .remove-item {
        margin-top: 15px;
    }

    .checkout-btn {
        width: 100%;
    }
}


.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: transparent;
    color: var(--secondary-color);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: var(--primary-color);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    list-style: none;
    padding: 10px 0;
    margin: 10px 0 0 0;
    min-width: 120px;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.lang-dropdown.active .lang-menu {
    display: block;
}

.lang-menu li {
    padding: 10px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    color: var(--text-dark);
    transition: background 0.2s;
}

.lang-menu li:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

/* ===== Slider Intro ===== */

.slider-wrapper {
    display: flex;
    flex-direction: row-reverse;
    max-width: 1400px;
    height: 80vh;
    gap: 25px;
    padding: 25px;
    margin: 40px auto;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.intro-slider {
    position: relative;
    width: 75%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* New Hero Banner */
.new-hero-section {
    padding: 20px 0;
    background-color: var(--bg-light);
    overflow: hidden;
}

.new-hero-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 15px;
    height: 420px;
    /* Adjusted height to match proportions without cropping */
}

.hero-right-img {
    flex: 2.3;
    display: flex;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
}

.hero-right-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 15% center;
    /* Crop from the right side to keep the biscuit and left text visible */
    display: block;
}

.hero-left-slider {
    flex: 7.7;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .new-hero-container {
        flex-direction: column;
        height: auto;
    }

    .hero-right-img {
        flex: none;
        width: 100%;
        height: 250px;
    }

    .hero-left-slider {
        flex: none;
        width: 100%;
        height: 300px;
    }
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* زر الدخول */
.enter-site-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.enter-site-btn:hover {
    background-color: var(--secondary-color);
}

.left-image {
    width: 25%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.left-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    background-color: #fff;
}

.logo-img {
    height: 60px;
    /* اضبط الارتفاع حسب الحاجة */
    width: auto;
    margin-right: 15px;
    /* مسافة بين اللوجو وباقي العناصر */
    vertical-align: middle;
    /* محاذاة العمودية مع النص */
}

/* Checkout Section */
:root {
    --checkout-blue: #5bc0de;
    --checkout-input-bg: #f5f7fa;
}

.checkout-section {
    padding: 60px 0;
    min-height: 80vh;
    background-color: #f4f7fa;
    /* لون رمادي فاتح مريح لإبراز الكروت */
}

.checkout-title {
    display: none;
    /* مخفي للتوافق مع الصورة */
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Right side (Form) */
.checkout-form-area {
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Left side (Summary) */
.checkout-summary-area {
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.checkout-form-area h3,
.checkout-summary-area h3 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--checkout-blue);
    display: inline-block;
    padding-bottom: 5px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--checkout-input-bg);
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.form-group input:focus {
    outline: none;
    background-color: #eef1f6;
}

.payment-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-option {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background-color: var(--checkout-input-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover,
.payment-option input:checked+.payment-text {
    border-color: var(--checkout-blue);
}

.payment-option input:checked+.payment-text {
    font-weight: bold;
    color: var(--checkout-blue);
}

.checkout-items-list {
    margin-bottom: 25px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ddd;
}

.checkout-item-details {
    flex-grow: 1;
}

.checkout-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: #444;
}

.checkout-item-details p {
    margin: 0;
    font-weight: bold;
    color: #777;
    font-size: 0.85rem;
}

.chk-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chk-qty-controls button {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.chk-qty-controls span {
    font-weight: bold;
    color: #333;
}

.checkout-totals {
    margin-top: 20px;
}

.checkout-totals .total-line {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.summary-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

.grand-total {
    font-size: 1.2rem !important;
    font-weight: bold;
    color: #333 !important;
}

/* Pill Buttons */
.place-order-btn,
.shop-now-btn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 20px;
    background-color: var(--checkout-blue);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s;
}

.place-order-btn:hover,
.shop-now-btn:hover {
    opacity: 0.9;
}

.place-order-btn:disabled {
    background-color: #aeddec;
    cursor: not-allowed;
    opacity: 1;
    /* reset opacity since #aeddec handles it */
}

.empty-cart-msg {
    color: #777;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
    }

    .checkout-summary-area {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        order: -1;
    }
}

/* Features Bar */
.features-bar {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 0;
}

.features-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.feature-item i {
    font-size: 1.5rem;
}

/* Categories Dropdown */
.categories-btn {
    position: relative;
}

.categories-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    margin-top: 15px;
    /* space bridge */
    border-radius: 8px;
    min-width: 180px;
    max-width: 90vw;
    z-index: 1000;
}

/* small invisible bridge to keep hover active */
.categories-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.categories-btn.active .categories-dropdown {
    display: block;
}


/* Flavors Dropdown */
.flavors-btn {
    position: relative;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    margin-right: 25px;
}

.flavors-btn:hover {
    color: var(--primary-color);
}

.flavors-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    margin-top: 15px; /* space bridge */
    border-radius: 8px;
    min-width: 150px;
    max-width: 90vw;
    z-index: 1000;
}

/* small invisible bridge to keep hover active */
.flavors-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.flavors-btn.active .flavors-dropdown {
    display: block;
}

.filter-option {
    padding: 10px 20px;
    color: var(--text-dark);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.filter-option:hover,
.filter-option.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Success Modal */
.success-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;
    backdrop-filter: blur(5px);
}

.success-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.success-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.success-icon {
    font-size: 80px;
    color: #1ba97f;
    margin-bottom: 20px;
    animation: popIn 0.5s ease;
}

.success-content h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.success-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.success-actions .back-to-home-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.success-actions .back-to-home-btn:hover {
    background: var(--secondary-color);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}



/* Hover Effect on Product Images */
.product-card img {
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
    /* Slight zoom hover effect */
}