/* ===== General Reset and Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2e8b57;
    --primary-dark: #236b43;
    --primary-light: #e8f5e9;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-gray: #f9f9f9;
    --border-color: #eee;
    --star-color: #fbc02d;
    --announcement-bg: #8db596;
    --whatsapp-green: #25D366;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
    font-family: inherit;
}

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

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

.btn-outline {
    background-color: rgba(0,0,0,0.35);
    color: white;
    border: 2px solid white;
    padding: 12px 28px;
    font-size: 15px;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: white;
    color: var(--text-color);
}

.w-100 {
    width: 100%;
}

/* ===== Announcement Bar ===== */
.announcement-bar {
    background-color: var(--announcement-bg);
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
}

/* ===== Header ===== */
.main-header {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h2 {
    font-family: 'Georgia', serif;
    font-size: 22px;
    line-height: 1;
    text-align: center;
    margin: 0;
}

.logo h2 a {
    color: inherit;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-icons button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    position: relative;
    /* User requested to hide Cart and User Profile icons */
    display: none !important;
}

.cart-btn .cart-count {
    display: none !important;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

/* ===== Products Section ===== */
.products-section {
    padding: 60px 15px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 750px;
    margin: 0 auto;
}

.product-card {
    text-align: center;
}

.product-card > a img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.product-card > a img:hover {
    transform: scale(1.03);
}

.product-title {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.5;
}

.product-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stars {
    color: var(--star-color);
    font-size: 14px;
    letter-spacing: 1px;
}

.reviews-count {
    color: var(--text-light);
    font-size: 13px;
}

.product-prices {
    margin-bottom: 15px;
}

.current-price {
    font-weight: bold;
    font-size: 16px;
}

.product-card .btn-choose {
    background-color: white;
    color: var(--text-color);
    border: 1px solid #ccc;
    border-radius: 0;
    padding: 10px 0;
    width: 100%;
    display: block;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.product-card .btn-choose:hover {
    background-color: var(--bg-gray);
}

/* ===== Reviews Section (Homepage) ===== */
.reviews-section {
    background-color: var(--bg-gray);
    padding: 60px 0 40px;
    position: relative;
}

.reviews-carousel-wrapper {
    position: relative;
}

.reviews-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 0 5px 15px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.reviews-carousel::-webkit-scrollbar {
    display: none;
}

.review-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex: 0 0 220px;
    overflow: hidden;
    text-align: center;
}

.review-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top;
}

.review-card-body {
    padding: 12px 15px 18px;
}

.review-stars-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 0;
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 0;
}

.reviewer-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.verified-icon {
    color: #4CAF50;
    font-size: 12px;
}

.review-text {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
    z-index: 5;
    transition: box-shadow 0.2s;
}

.carousel-arrow:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.carousel-arrow.arrow-left {
    left: -10px;
}

.carousel-arrow.arrow-right {
    right: -10px;
}

.loox-credit {
    text-align: left;
    font-size: 11px;
    color: #999;
    margin-top: 10px;
    padding-right: 10px;
}

/* ===== Footer ===== */
.main-footer {
    padding: 50px 0 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-logo h2 {
    font-family: 'Georgia', serif;
    font-size: 22px;
    line-height: 1;
}

.footer-social {
    margin-bottom: 25px;
}

.footer-social a {
    display: inline-block;
    margin: 0 10px;
    color: var(--text-color);
    font-size: 18px;
    transition: color 0.2s;
}

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

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.footer-lang-select {
    padding: 8px 25px;
    border: 1px solid var(--border-color);
    background: white;
    font-family: inherit;
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ===== WhatsApp Floating Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.3s;
    color: white;
    font-size: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ===== Checkout Modal ===== */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.checkout-modal-overlay.active {
    display: flex;
}

.checkout-modal {
    background: white;
    width: 92%;
    max-width: 480px;
    border-radius: 10px;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 12px;
    left: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-light);
    z-index: 5;
}

/* Modal Order Summary (replaces product preview) */
.modal-order-summary {
    background: var(--primary-light);
    border-bottom: 1px solid #c8ddc8;
    padding: 14px 20px;
}

.modal-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-summary-pack {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-dark);
}

.modal-price {
    font-weight: 800;
    font-size: 16px;
    color: var(--primary-dark);
    white-space: nowrap;
}

.modal-books-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-book-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-color);
}

.modal-book-item .book-index {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 12px;
    min-width: 24px;
}

.modal-book-item .book-title {
    flex: 1;
}

.modal-body {
    padding: 20px;
}

.modal-title {
    font-size: 17px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 5px;
}

.modal-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.order-form .form-group {
    margin-bottom: 14px;
}

.order-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
}

.order-form input,
.order-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-gray);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: inherit;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-value {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    text-align: center;
    font-size: 16px;
    font-family: inherit;
    font-weight: bold;
}

.qty-value::-webkit-inner-spin-button,
.qty-value::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.payment-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: var(--primary-light);
    border-radius: 6px;
}

.payment-badges i {
    font-size: 20px;
    color: var(--primary-color);
}

.payment-badges span {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}

.order-form .btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    font-size: 17px;
    border-radius: 6px;
    margin-top: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    transition: background 0.2s;
}

.order-form .btn-submit:hover {
    background-color: var(--primary-dark);
}

/* ===== Product Page Styles ===== */
.product-page-container {
    display: flex;
    flex-direction: row-reverse;
    gap: 35px;
    padding: 35px 15px;
}

.product-details {
    flex: 1;
    position: sticky;
    top: 70px;
    height: fit-content;
    max-width: 380px;
}

.product-media {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title-large {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.4;
}

.price-large {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===== Pack Cards ===== */
.packs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pack-card {
    position: relative;
    border: 2px solid #dce8db;
    border-radius: 10px;
    background: var(--primary-light);
    padding: 14px 14px 0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.pack-card:has(.pack-radio:checked) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.pack-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
}

.pack-radio-label {
    display: flex;
    align-items: center;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

.pack-radio {
    display: none;
}

.pack-radio-custom {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.pack-radio:checked + .pack-radio-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px white;
}

.pack-info {
    flex: 1;
}

.pack-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.discount-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.pack-prices {
    text-align: left;
    flex-shrink: 0;
}

.pack-new-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
}

.pack-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

/* Best-Seller Badge */
.pack-bestseller {
    border-color: var(--primary-color);
}

.bestseller-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #f48fb1;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 8px 0;
    z-index: 2;
    font-style: italic;
}

/* Book Selects inside Pack */
.pack-selects {
    border-top: 1px solid rgba(46,139,87,0.2);
    padding: 12px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selects-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.book-select-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    width: 24px;
    flex-shrink: 0;
}

.book-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #c8ddc8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: white;
    cursor: pointer;
    color: var(--text-color);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 30px;
}

.book-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* WhatsApp Inline Button */
.btn-whatsapp-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    font-size: 15px;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-whatsapp-inline:hover {
    background: #1da851;
}

/* City + Address Combined */
.city-address-combined {
    display: flex;
    gap: 8px;
}

.city-select-half {
    flex: 0 0 140px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
    cursor: pointer;
}

.city-select-half:focus {
    outline: none;
    border-color: var(--primary-color);
}

.address-input-half {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.address-input-half:focus {
    outline: none;
    border-color: var(--primary-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-buy-now {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    font-size: 17px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    animation: pulse 2s infinite;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-weight: bold;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.btn-buy-now:hover {
    background-color: var(--primary-dark);
}

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

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-gray);
    padding: 10px;
    border-radius: 6px;
}

.trust-badge-item i {
    color: var(--primary-color);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===== Image Grid (Product Page) ===== */
.content-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.content-images-grid img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
    transition: transform 0.2s;
    aspect-ratio: 1;
    object-fit: cover;
}

.content-images-grid img:hover {
    transform: scale(1.03);
}

/* Lifestyle Images */
.lifestyle-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.lifestyle-images img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    height: 200px;
}

/* ===== FAQ Accordion ===== */
.faq-section {
    padding: 50px 0;
    background: var(--bg-gray);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 22px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: none;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    color: var(--text-color);
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-gray);
}

.faq-question i {
    transition: transform 0.3s;
    font-size: 14px;
    color: var(--text-light);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 16px;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Product Reviews Section ===== */
.product-reviews-section {
    padding: 50px 0;
}

.product-reviews-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 22px;
}

.product-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.product-review-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-review-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-review-card-body {
    padding: 10px 12px;
    text-align: center;
}

.product-review-card-body .review-stars-bar-sm {
    color: var(--star-color);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.product-review-card-body p {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 4px; }

/* ===== Product Description ===== */
.product-description {
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-color);
}
.product-description ul {
    padding-right: 18px;
    margin: 8px 0;
}
.product-description li { margin-bottom: 4px; }

/* ===== Reviews Header Row ===== */
.reviews-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.reviews-stars-big {
    font-size: 20px;
    color: var(--star-color);
    font-weight: 700;
}
.reviews-stars-big span {
    font-size: 14px;
    color: var(--text-light);
    margin-right: 6px;
}
.reviews-filter {
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
}
.product-review-card-body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* ===== Footer Lang Select ===== */
.footer-lang-select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 12px;
    background: white;
}
.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 12px;
}
.footer-links a:hover { text-decoration: underline; }

/* ===== MOBILE Gallery Slider ===== */
.mobile-gallery {
    display: none; /* hidden on desktop */
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.mobile-gallery-track {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mobile-gallery-track::-webkit-scrollbar { display: none; }

.mobile-gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    max-height: 380px;
}
.mobile-gallery-slide img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: contain;
    background: white;
}

.mobile-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    background: white;
}
.mobile-gallery-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s;
}
.mobile-gallery-dots .dot.active {
    background: var(--primary-color);
}

/* ===== MOBILE Desc + Content grid section ===== */
.mobile-desc-section {
    display: none; /* hidden on desktop */
    padding: 20px 15px;
}

.mobile-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 20px;
}
.mobile-content-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

/* ===== Desktop: Mixed Media Grid ===== */
.media-main-img img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
    max-height: 420px;
    object-fit: cover;
}

.media-grid-mixed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.media-grid-mixed > div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.media-grid-wide {
    grid-column: span 2;
    height: 180px;
}
.media-grid-normal {
    grid-column: span 1;
    height: 130px;
}
.media-grid-tall {
    grid-column: span 1;
    grid-row: span 2;
    height: 268px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    /* Show mobile-only elements */
    .mobile-gallery { display: block; }
    .mobile-desc-section { display: block; }

    /* Hide desktop media column entirely on mobile */
    #productMedia { display: none !important; }

    /* Hide desktop description (shown only in mobile-desc-section) */
    #productDetails .product-description { display: none; }

    .product-page-container {
        flex-direction: column;
        padding: 16px 15px;
    }

    #productDetails {
        position: relative;
        top: 0;
        max-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hero img { height: 300px; }
    .review-card { flex: 0 0 180px; }

    .product-title-large { font-size: 18px; }
    .price-large { font-size: 20px; }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
    }
    .header-container {
        flex-direction: row-reverse;
        gap: 10px;
    }
}

/* ===== Mobile Sticky Bottom Bar ===== */
.mobile-sticky-bar {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    /* Push content above sticky bar */
    body {
        padding-bottom: 76px;
    }

    .mobile-sticky-bar {
        display: flex;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: white;
        border-top: 1px solid #e0e0e0;
        padding: 10px 16px;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.10);
    }

    .btn-sticky-order {
        flex: 1;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 10px;
        padding: 14px;
        font-size: 16px;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: background 0.2s, transform 0.1s;
        animation: pulse 2.5s infinite;
    }

    .btn-sticky-order:active {
        transform: scale(0.97);
    }

    .btn-sticky-order:hover {
        background: var(--primary-dark);
    }
}

/* Book select error highlight + shake */
@keyframes selectShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.book-select.select-error {
    border-color: #e53935 !important;
    animation: selectShake 0.4s ease;
}

/* Hint message below packs */
.books-hint {
    font-size: 12px;
    color: #e53935;
    margin-top: -8px;
    margin-bottom: 10px;
    display: none;
    text-align: center;
    font-weight: 600;
}
.books-hint.visible {
    display: block;
}
