/* Reset et variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-color: #34495e;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', sans-serif;
    /* User requested font */
}

body {
    font-family: 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #eef2ef;
    /* User requested background */
}

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

/* NAVBAR */
.navbar {
    background: white;
    padding: 20px 40px;
}

.mobile-toggle {
    display: none;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.logo {
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 1px;
}

.menu a {
    text-decoration: none;
    color: #333;
    /* Dark grey/black */
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #000;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    border-radius: 5px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

/* HERO */
.hero {
    position: relative;
    height: 90vh;
    background: url("../images/header/bg.jpg") center/cover no-repeat;
    /* Kept the slider background functionality but applied user's sizing/padding */
    display: flex;
    align-items: center;
    padding: 60px;
}

.hero-content {
    max-width: 500px;
    color: white;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    margin-bottom: 30px;
    font-size: 16px;
}

.hero-content button {
    padding: 12px 24px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

/* PRODUCT CARDS */
.product-cards {
    position: absolute;
    right: 60px;
    bottom: 60px;
    display: flex;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: auto;
}

.card-info {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* Slider Controls */
.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 5;
}

.slider-controls button:hover {
    background: rgba(255, 255, 255, 0.8);
    color: black;
}

.prev-slide {
    left: 20px;
}

.next-slide {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 5;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

@keyframes fadeEffect {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    height: auto;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 100%;
        margin-top: 20%;
    }

    .close-lightbox {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* Specific product detail responsiveness */
@media (max-width: 991px) {
    .product-detail {
        gap: 2rem;
    }

    .product-main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 1.5rem 0;
    }

    .product-main-image {
        height: auto;
        max-height: 450px;
        aspect-ratio: 1/1;
    }

    .product-info-detail h1 {
        font-size: 1.8rem;
    }

    .product-price-detail {
        font-size: 1.8rem;
    }

    .whatsapp-order-btn {
        width: 100%;
        text-align: center;
        padding: 1.2rem;
    }

    .quantity-selector {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .quantity-selector input {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .product-main-image {
        max-height: 350px;
    }

    .product-thumbnail {
        width: 70px;
        height: 70px;
    }

    .product-info-detail h1 {
        font-size: 1.5rem;
    }

    .product-price-detail {
        font-size: 1.5rem;
    }
}

.btn-shop-now {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #000;
    /* Matching the 'Shop Now' button in the image */
    color: #fff;
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-shop-now:hover {
    background: #333;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

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

.btn-secondary:hover {
    background: #2980b9;
}

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

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

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

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.category-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-color);
}

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

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

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white);
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.product-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.product-seller {
    color: #999;
    font-size: 0.85rem;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    color: var(--primary-color);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.table th,
.table td {
    padding: 1rem;
    text-align: left;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-color);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--accent-color);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.whatsapp-btn {
    display: inline-block;
    background: #25D366;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Responsive Design */
@media (max-width: 991px) {
    .navbar {
        padding: 15px 20px;
    }

    .menu.left {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 0;
    }

    .menu.right {
        display: flex;
        gap: 15px;
    }

    .menu.left.active {
        display: flex;
    }

    .menu li {
        width: 100%;
        text-align: center;
    }

    .menu li a {
        display: block;
        padding: 15px;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-toggle {
        display: flex !important;
        cursor: pointer;
        font-size: 1.5rem;
    }

    .logo {
        font-size: 18px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 40px;
    }

    .search-container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-main-image {
        height: 350px;
    }

    .product-thumbnails {
        flex-wrap: wrap;
    }

    .product-thumbnail {
        width: 80px;
        height: 80px;
    }

    .hero {
        padding: 30px;
        height: auto;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .product-image {
        height: 200px;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.product-images {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.product-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--secondary-color);
}

.product-info-detail h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-price-detail {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: bold;
    margin: 1rem 0;
}

.product-description {
    margin: 2rem 0;
    line-height: 1.8;
}

.product-attributes {
    margin: 2rem 0;
}

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

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

.attribute-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.attribute-option {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.attribute-option:hover,
.attribute-option.selected {
    border-color: var(--secondary-color);
    background: var(--light-color);
}

.whatsapp-order-btn {
    background: #25D366;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    margin-top: 1rem;
    transition: var(--transition);
}

.whatsapp-order-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

.stock-info {
    margin: 1.5rem 0;
    font-weight: 600;
}

.stock-available {
    color: var(--success-color);
}

.stock-empty {
    color: var(--accent-color);
}

.quantity-selector {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector input {
    width: 80px;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}



/* Slider Styles (Restored for Background) */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
}

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

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

.hero-full-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Controls */
.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 5;
}

.slider-controls button:hover {
    background: rgba(255, 255, 255, 0.8);
    color: black;
}

.prev-slide {
    left: 20px;
}

.next-slide {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 5;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

@keyframes fadeEffect {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}