/* Aggarwal / Shivam Bhog Namkeen Custom Styles & Dynamic Responsive UI Enhancements */
:root {
    --primary-color: #d32f2f;
    --primary-hover: #b71c1c;
    --secondary-color: #ff9800;
    --dark-text: #2c2c2c;
    --light-bg: #f9f6f0;
    --white: #ffffff;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* AJAX Live Search Dropdown Styles */
.search-ajax-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 280px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 8px;
    z-index: 9999;
    display: none;
    overflow: hidden;
}
.search-results-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #f4f4f4;
}
.search-result-item:hover {
    background: #fff8f8;
    color: var(--primary-color);
}
.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}
.search-result-info {
    flex: 1;
}
.search-result-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}
.search-result-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
}
.search-no-results {
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* Toast Notifications */
.cart-toast-notification {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #2e7d32;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Slide-out Mini Cart Drawer */
.mini-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mini-cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mini-cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    z-index: 100000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.mini-cart-drawer.active {
    right: 0;
}

.mini-cart-header {
    padding: 18px 20px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mini-cart-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mini-cart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.mini-cart-item img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}
.mini-cart-item-details {
    flex: 1;
}
.mini-cart-item-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}
.mini-cart-item-price {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 700;
}
.mini-cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.mini-cart-qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mini-cart-remove-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}
.mini-cart-remove-btn:hover {
    color: var(--primary-color);
}

.mini-cart-footer {
    padding: 18px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}
.mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #222;
}
.mini-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btn-view-cart {
    display: block;
    text-align: center;
    padding: 12px;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s;
}
.btn-view-cart:hover {
    background: #111;
    color: #fff;
}
.btn-checkout {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s;
}
.btn-checkout:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* Badge Counter */
.cart-count-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    position: relative;
    top: -8px;
    margin-left: 2px;
}

/* Hero Carousel Dynamic Styles */
.hero-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 550px;
}
.hero-slide {
    display: none;
    position: relative;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
}
.hero-slide.active {
    display: flex;
    align-items: center;
}
.hero-slide-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 0 30px;
    color: #fff;
}
.hero-slide-content h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.2;
}
.hero-slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
    color: #f0f0f0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.btn-hero-cta {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    transition: all 0.3s ease;
}
.btn-hero-cta:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
    color: #fff;
}

/* Carousel Prev/Next Controls */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.7);
    color: #333;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.carousel-nav-btn:hover {
    background: #fff;
    color: var(--primary-color);
}
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }

/* Add to Cart Hover overlay on products */
.product-card-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.product-card-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.product-thumb-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
}
.product-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card-wrap:hover .product-thumb-box img.main-img {
    opacity: 0;
}
.product-card-wrap:hover .product-thumb-box img.hover-img {
    opacity: 1;
    transform: scale(1.05);
}
.product-thumb-box img.hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.btn-add-cart-fast {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}
.btn-add-cart-fast:hover {
    background: var(--primary-hover);
}

/* ===================================================
   RESPONSIVE MEDIA QUERIES FOR ALL MOBILE DEVICES
   =================================================== */

/* Tablet (max-width: 991px) */
@media (max-width: 991px) {
    .hero-slide { height: 400px; }
    .hero-slide-content h2 { font-size: 32px; }
    .hero-slide-content p { font-size: 16px; margin-bottom: 20px; }
    .btn-hero-cta { padding: 12px 24px; font-size: 14px; }
    
    .admin-sidebar { width: 100%; height: auto; min-height: initial; position: relative; }
    .admin-content { margin-left: 0; padding: 20px 15px; }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .hero-slide { height: 350px; }
    .hero-slide-content { padding: 0 15px; }
    .hero-slide-content h2 { font-size: 26px; margin-bottom: 10px; }
    .hero-slide-content p { font-size: 14px; margin-bottom: 15px; }
    .btn-hero-cta { padding: 10px 20px; font-size: 13px; }
    
    .carousel-nav-btn { width: 35px; height: 35px; font-size: 14px; }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }

    .cart-toast-notification {
        left: 15px; right: 15px; bottom: 15px;
        text-align: center; justify-content: center;
        padding: 12px 18px; font-size: 14px;
    }
}

/* Small Mobile Screens (max-width: 480px) */
@media (max-width: 480px) {
    .hero-slide { height: 300px; }
    .hero-slide-content h2 { font-size: 22px; line-height: 1.25; }
    .hero-slide-content p { font-size: 12px; margin-bottom: 12px; }
    .btn-hero-cta { padding: 8px 16px; font-size: 12px; }

    .mini-cart-drawer { max-width: 100%; right: -100%; }

    .product-card-wrap { padding: 8px; }
    .btn-add-cart-fast { padding: 8px 4px; font-size: 12px; }
}
