/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-brown);
}

:root {
    --primary-gold: #C28B03;
    /* Exact Reference Site Price Gold */
    --dark-brown: #6B4834;
    /* Exact Reference Site Title Brown */
    --text-dark: #333333;
    --text-gray: #7A7A7A;
    --bg-white: #FFFFFF;
    --bg-light: #F4ECE1;
    /* Light creamy wood base for mixture */
    --bg-wood-dark: #3D1C04;
    /* Dark Vector Wood Base */
    --btn-teal: #008080;
    --btn-teal-hover: #006666;
    --accent-red: #C41E3A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-wood-dark);
    background-image:
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0px, rgba(0, 0, 0, 0.2) 2px, transparent 2px, transparent 5px, rgba(255, 255, 255, 0.05) 5px, rgba(255, 255, 255, 0.05) 6px, transparent 6px, transparent 10px),
        url('https://www.transparenttextures.com/patterns/purty-wood.png');
    /* Creates a horizontal streaked vector wood effect similar to the requested image */
    background-blend-mode: multiply;
    background-attachment: fixed;
    color: var(--text-dark);
}

header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Increased z-index to stay above everything */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.top-bar {
    background-color: var(--dark-brown);
    color: var(--bg-white);
    padding: 5px 20px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bottom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px;
    min-height: 50px;
    height: auto;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-gold);
}

.search-bar {
    flex-grow: 1;
    margin: 0 30px;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 10px 20px;
    background-color: var(--primary-gold);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.header-actions button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--dark-brown);
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

/* Layout */
.container {
    display: flex;
    max-width: 1400px;
    /* Big monitor support */
    margin: 30px auto;
    padding: 0 40px;
    gap: 40px;
    /* generous gap */
}

/* Layout Removed - Main layout stretch applied inline. Kept for container alignments. */
.dropdown-cat-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    color: var(--dark-brown);
    transition: 0.3s;
    cursor: pointer;
}

.dropdown-cat-list li:hover {
    background: var(--bg-light);
    color: var(--primary-gold);
}

/* Products Grid */
.products-area {
    flex-grow: 1;
    min-width: 0;
    /* Prevents flex overflow */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Products Grid Update */
.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.15);
    /* Elegant gold glow */
    border-color: rgba(212, 175, 55, 0.3);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #fdfdfd;
}

.img-fallback-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    border: 1px dashed #ccc;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.product-card:hover .product-overlay {
    transform: translateY(0);
}

.overlay-btn {
    flex: 1;
    background: transparent;
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.overlay-btn:hover {
    background: var(--primary-gold);
}

.overlay-btn.search-btn {
    flex: 0 0 60px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.product-info {
    padding: 20px;
    background: white;
}

.product-cat-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-price {
    font-size: 22px;
    color: var(--primary-gold);
    font-weight: 800;
}

/* Related Products specific grid */
.related-products-section {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.related-heading {
    flex: 0 0 200px;
    text-align: left;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 24px;
    line-height: 1.2;
    color: var(--dark-brown);
}

.related-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
}

@media (max-width: 992px) {
    .related-products-section {
        flex-direction: column;
        gap: 20px;
    }

    .related-heading {
        flex: none;
        text-align: center;
        width: 100%;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Product Detail Page Styles */
.pd-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.pd-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px;
}

.pd-image-section {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.pd-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.pd-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pd-breadcrumb {
    font-size: 14px;
    color: var(--text-gray);
    text-transform: uppercase;
}

.pd-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark-brown);
}

.pd-price {
    font-size: 28px;
    color: var(--primary-gold);
    font-weight: 700;
}

.pd-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 20px 0;
}

.pd-option-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    color: #333;
}

.pd-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    background: #fdfdfd;
}

.pd-quantity-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.pd-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fdfdfd;
}

.pd-qty-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.pd-qty-input {
    width: 50px;
    border: none;
    text-align: center;
    font-weight: 700;
    pointer-events: none;
}

.pd-add-to-cart {
    flex-grow: 1;
    height: 45px;
    background: #333;
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.pd-add-to-cart:hover {
    background: var(--primary-gold);
}

.pd-tabs {
    border-top: 1px solid #eee;
    padding-top: 40px;
    margin-top: 40px;
}

.pd-tab-header {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.pd-tab-btn {
    padding: 10px 0;
    background: none;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
}

.pd-tab-btn.active {
    color: var(--accent-red);
}

.pd-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
}

.additional-info-table {
    width: 100%;
    border-collapse: collapse;
}

.additional-info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.additional-info-table td {
    padding: 15px;
}

.additional-info-table td:first-child {
    font-weight: 700;
    width: 200px;
}

@media (max-width: 992px) {
    .pd-main {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

/* Cart Drawer */
/* Cart Popup Modal */
.cart-drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 500px;
    max-width: 95vw;
    height: 80vh;
    max-height: 600px;
    background: var(--bg-white);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
}

.cart-drawer.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cart-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--dark-brown) 0%, #4a3225 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--dark-brown);
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    color: var(--primary-gold);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.cart-item-qty button {
    background: #eee;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: var(--bg-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dark-brown);
}

.btn-checkout {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Empty Cart UI */
.empty-cart-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    height: 60%;
}

.empty-cart-icon {
    font-size: 80px;
    color: #eee;
    margin-bottom: 20px;
}

.empty-cart-ui p {
    color: #888;
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-shop-now {
    background: var(--primary-gold);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(194, 139, 3, 0.3);
}

.btn-shop-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(194, 139, 3, 0.4);
}

/* Reviews Section */
.reviews-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.google-reviews-section {
    padding: 80px 0;
    width: 100%;
    margin: 0 auto;
}

.google-rating-badge {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.google-rating-badge img {
    height: 30px;
    margin-bottom: 15px;
}

.google-rating-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rating-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.rating-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.rating-item i {
    color: #fbbc04;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stars {
    color: #fbbc04;
    font-size: 16px;
}

.review-branch {
    font-size: 10px;
    font-weight: 800;
    background: #F4ECE1;
    color: var(--primary-gold);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-text {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 25px;
    flex-grow: 1;
}

.review-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-author {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.review-date {
    font-size: 13px;
    color: #888;
}

.add-review-section {
    margin-bottom: 20px;
    background: var(--bg-white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.add-review-section h3 {
    margin-bottom: 10px;
    color: var(--dark-brown);
    font-size: 16px;
}

#addReviewForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

#addReviewForm input,
#addReviewForm textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
}

#addReviewForm textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-submit-review {
    background-color: var(--primary-gold);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background-color: var(--bg-white);
    border-top: 1px solid #eee;
    padding: 40px 20px 10px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.haji-logo-large {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-gold);
    font-family: 'Times New Roman', serif;
    letter-spacing: 1px;
}

.footer-contact {
    flex: 2;
    min-width: 300px;
}

.footer-contact h3 {
    color: var(--dark-brown);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-contact p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.footer-contact p strong {
    color: var(--text-dark);
}

.footer-socials {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Center social icons on mobile only */
.is-mobile .footer-socials {
    justify-content: center;
}

.footer-socials strong {
    font-size: 16px;
    color: var(--text-dark);
}

.footer-socials a {
    color: var(--bg-white);
    background: var(--btn-teal);
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
}

.footer-socials a:hover {
    background: var(--primary-gold);
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

.footer-info h3 {
    color: var(--dark-brown);
    font-size: 18px;
    margin-bottom: 15px;
}

.timings-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.time-val {
    color: var(--text-gray);
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: var(--text-gray);
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Blinking WhatsApp Logo */
.floating-whatsapp {
    position: fixed;
    bottom: 35px;
    /* raised to not cover footer text */
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-decoration: none;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- Splash Loader --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.loader-content {
    text-align: center;
}

.loader-logo-container {
    animation: zoomInOut 1.5s infinite alternate;
}

@keyframes zoomInOut {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* --- Header Updates --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-brown);
    cursor: pointer;
    display: none;
}

#welcomeText {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    #welcomeText {
        font-size: 15px !important;
        margin: 10px 0;
        padding: 5px;
        background: rgba(184, 134, 11, 0.05);
        border-radius: 4px;
        letter-spacing: 0.5px !important;
    }
}

.login-btn {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-right: -10px;
}

.login-btn:hover {
    background: var(--bg-light);
    color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- Hero Slider (Full Stretch & Crossfade) --- */
/* --- Hero Slider (Center-Mode Carousel) --- */
.full-width-slider {
    position: relative;
    width: 100%;
    height: 400px;
    /* Adjusted height for better UI */
    overflow: hidden;
    background: transparent;
    padding: 20px 0;
}

.full-width-slides {
    display: flex;
    align-items: center;
    width: max-content;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.slide {
    width: 95vw;
    /* Main slide width */
    max-width: 1200px;
    height: 100%;
    margin: 0 10px;
    border-radius: 20px;
    /* Rounded corners like in pic */
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0.4;
    transform: scale(0.85);
    /* Side slides smaller */
    background-size: 100% 100%; /* Forces the image to auto-adjust exactly to the banner box size */
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(194, 139, 3, 0.3);
    animation: floatingBanner 4s ease-in-out infinite;
}

@keyframes floatingBanner {
    0% { transform: scale(1) translateY(0px); }
    50% { transform: scale(1) translateY(-10px); }
    100% { transform: scale(1) translateY(0px); }
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-gold);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

/* --- Modal Styles --- */
.city-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.city-modal-content {
    background-color: var(--bg-white);
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideDown 0.3s;
}

.close-city-modal {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.city-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
}

.city-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: 0.3s;
}

.city-list li:hover {
    background-color: var(--bg-light);
    color: var(--primary-gold);
}


@keyframes modalSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Shop By Category --- */
.shop-by-category {
    margin-bottom: 40px;
}

.category-images-grid {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 20px 10px;
    /* Added vertical padding to prevent clipping */
    justify-content: center;
    perspective: 1000px;
    /* For 3D depth */
}

.cat-img-card {
    text-align: center;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.cat-img-card:hover {
    transform: translateY(-15px) rotateX(10deg) scale(1.08);
}

.cat-img-card img {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    transition: all 0.4s ease;
}

.cat-img-card:hover img {
    border-color: var(--primary-gold);
    box-shadow: 0 20px 40px rgba(184, 134, 11, 0.3);
}

.cat-img-card h4 {
    margin-top: 10px;
    font-size: 14px;
    color: var(--bg-white);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background: var(--bg-white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-left: 5px solid var(--primary-gold);
    min-width: 250px;
    max-width: 300px;
    transform: translateX(-120%);
    animation: toastSlideIn 0.5s forwards, toastSlideOut 0.5s forwards 3s;
}

.toast-header {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--dark-brown);
}

.toast-body {
    font-size: 13px;
    color: var(--text-gray);
}

.toast-stars {
    color: #f5b301;
    font-size: 14px;
    margin-bottom: 3px;
}

@keyframes toastSlideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    to {
        transform: translateX(-120%);
        opacity: 0;
    }
}

/* --- 360° Responsiveness (Auto Adjust for PC, Laptop, Tablet, Mobile) --- */
@media (max-width: 1200px) {

    .main-header,
    .bottom-header {
        padding: 15px 20px !important;
    }
}

@media (max-width: 992px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-left {
        width: 100%;
        justify-content: center;
        gap: 15px !important;
    }

    .search-bar {
        width: 100% !important;
        margin: 0 !important;
        order: 3;
    }

    .header-actions {
        width: 100%;
        justify-content: center !important;
        flex-wrap: wrap;
        /* Auto drop to next line */
        gap: 15px;
        order: 2;
    }

    .header-sep, .header-actions div[style*="width: 1px"] {
        display: none !important;
        /* Hide separator lines on tablets to save space */
    }

    #welcomeText {
        font-size: 16px !important;
        letter-spacing: 1px !important;
    }
}

@media (max-width: 768px) {
    /* Critical Fix: Enable scrolling on mobile */
    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding: 0 15px !important;
        /* Fix padding bleeding on tablets/phones */
        gap: 20px !important;
        margin: 20px auto !important;
    }

    .bottom-header {
        height: auto !important;
        flex-direction: column;
        gap: 15px;
        padding: 15px !important;
        flex-wrap: wrap;
    }

    .cat-dropdown-container {
        width: 100%;
        height: 45px !important;
    }

    .cat-dropdown-button {
        width: 100% !important;
        border-radius: 8px !important;
    }

    #welcomeText {
        order: -1;
        /* Move welcome text to top on mobile */
        width: 100%;
        font-size: 14px !important;
    }

    .full-width-slider {
        height: 250px;
    }

    .slide {
        width: 92vw;
        max-width: none;
        margin: 0 5px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-section {
        align-items: center;
    }

    .page-header h1 {
        font-size: 32px !important;
    }

    .page-header p {
        font-size: 15px !important;
    }

    .certs-container {
        gap: 20px !important;
    }
}

@media (max-width: 480px) {
    .action-text {
        display: inline-block !important;
        font-size: 11px !important;
        letter-spacing: 0.2px !important;
        text-transform: uppercase;
    }

    .main-header {
        padding: 10px !important;
        gap: 10px !important;
    }

    .logo-box img {
        width: 80px !important;
        height: 80px !important;
    }

    #hajiRabriLogoText {
        font-size: 18px !important;
        letter-spacing: 0.5px !important;
    }

    .header-actions a,
    .header-actions button {
        font-size: 11px !important;
        /* Auto scale fonts for mobile reading */
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        /* Two compact columns on phones */
        gap: 10px;
    }

    .product-card {
        padding: 8px;
    }

    .product-image-container {
        height: 120px;
    }

    .product-title {
        font-size: 12px;
        margin-top: 5px;
    }

    .product-price {
        font-size: 14px;
    }

    .overlay-btn {
        padding: 8px;
        font-size: 10px;
    }

    .full-width-slider {
        height: 180px;
    }

    .toast-container {
        left: 10px !important;
        bottom: 70px !important;
        width: calc(100% - 20px) !important;
    }

    .toast {
        min-width: unset !important;
        width: 100% !important;
    }

    div[style*="font-size: 32px"] {
        font-size: 24px !important;
        /* Dynamically rescale any inline 32px text */
    }
}

/* --- Header Restructuring Utilities --- */
.hide-on-mobile {
    display: none !important;
}

.hide-on-desktop {
    display: flex !important;
}

.conditional-hide-container {
    display: flex;
    align-items: center;
    gap: 10px;
}


@media (min-width: 993px) {
    .hide-on-mobile {
        display: flex !important;
    }

    .hide-on-desktop {
        display: none !important;
    }

    /* Integrated Desktop Actions Styling */
    .search-bar-actions {
        display: flex;
        align-items: center;
        gap: 15px;
        padding-left: 15px;
        border-left: 1px solid #ddd;
        margin-left: 15px;
    }

    .search-bar-actions .action-btn {
        background: none;
        border: none;
        color: #333;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        text-transform: uppercase;
        transition: color 0.3s;
        text-decoration: none;
    }

    .search-bar-actions .action-btn:hover {
        color: var(--primary-gold);
    }

    .search-bar-actions .action-sep {
        height: 20px;
        width: 1px;
        background: #ddd;
    }
}