/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.logo h1 a {
    color: white;
    text-decoration: none;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

/* Shopping Cart Styles */
.cart-container {
    position: relative;
}

.cart-icon {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cart-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-icon i {
    font-size: 24px;
}

.cart-count {
    background-color: #ff4081;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-total {
    font-weight: bold;
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 15px;
    color: #333;
    display: none;
    z-index: 1001;
}

.cart-dropdown.active {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    font-size: 20px;
    color: #1a237e;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.close-cart:hover {
    color: #333;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-name {
    flex: 1;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.item-price {
    font-weight: bold;
    color: #1a237e;
    min-width: 60px;
    text-align: right;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.cart-subtotal {
    text-align: right;
    margin-bottom: 15px;
    font-size: 18px;
    color: #1a237e;
}

.checkout-btn, .clear-cart {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.checkout-btn {
    background-color: #4caf50;
    color: white;
}

.checkout-btn:hover {
    background-color: #388e3c;
}

.clear-cart {
    background-color: #f5f5f5;
    color: #333;
}

.clear-cart:hover {
    background-color: #e0e0e0;
}

/* Navigation */
.main-nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 15px 0;
}

.nav-menu li {
    margin-right: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3949ab;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3949ab;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f5f5f5;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 10px;
}

.breadcrumb-list li {
    color: #666;
}

.breadcrumb-list a {
    color: #3949ab;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* Product Grid - CSS Tableless using Flexbox */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    flex: 1 1 calc(25% - 25px);
    min-width: 250px;
    max-width: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 17px;
    margin-bottom: 10px;
    height: 45px;
    overflow: hidden;
}

.product-info h3 a {
    color: #333;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: #3949ab;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 90%;
    padding: 10px;
    background-color: #3949ab;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #1a237e;
}

/* Category Header */
.category-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.category-header h2 {
    font-size: 32px;
    color: #1a237e;
    margin-bottom: 10px;
}

.category-header p {
    color: #666;
    font-size: 18px;
}

/* Product Details Page */
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.product-images {
    flex: 1;
    min-width: 300px;
}

.main-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-images {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, border 0.3s;
    border: 2px solid transparent;
}

.thumbnail.active, .thumbnail:hover {
    opacity: 1;
    border-color: #3949ab;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
    min-width: 300px;
}

.product-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #1a237e;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #ffc107;
}

.rating-text {
    color: #666;
}

.product-price {
    margin-bottom: 25px;
}

.current-price {
    font-size: 36px;
    font-weight: bold;
    color: #1a237e;
    margin-right: 15px;
}

.original-price {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
    margin-right: 15px;
}

.discount {
    background-color: #ff4081;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.product-description, .product-specs {
    margin-bottom: 25px;
    margin-right: 10px;
}

.product-description h3, .product-specs h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.product-description ul {
    padding-left: 20px;
    margin-top: 10px;
}

.product-description li {
    margin-bottom: 8px;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs tr {
    border-bottom: 1px solid #eee;
}

.product-specs td {
    padding: 10px 0;
}

.product-specs td:first-child {
    font-weight: bold;
    width: 40%;
}

.add-to-cart-section {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #f0f0f0;
}

#quantity {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.buy-now-btn, .add-to-cart-btn {
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 15px;
}

.buy-now-btn {
    background-color: #ff4081;
    color: white;
}

.buy-now-btn:hover {
    background-color: #e91e63;
}

.product-meta {
    color: #666;
    font-size: 14px;
}

.in-stock {
    color: #4caf50;
    font-weight: bold;
}

.related-products {
    margin-top: 50px;
}

.related-products h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #1a237e;
    text-align: center;
}

.related-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

/* Footer */
.site-footer {
    background-color: #1a237e;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-section p {
    margin-bottom: 10px;
    color: #e0e0e0;
}

.footer-section i {
    margin-right: 10px;
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-card {
        flex: 1 1 calc(33.333% - 25px);
    }
    
    .cart-dropdown {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .product-card {
        flex: 1 1 calc(50% - 25px);
    }
    
    .product-container {
        flex-direction: column;
    }
    
    .cart-dropdown {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        display: none;
        flex-direction: column;
    }
    
    .cart-dropdown.active {
        display: flex;
    }
    
    .cart-items {
        flex: 1;
        max-height: none;
    }
}

@media (max-width: 576px) {
    .product-card {
        flex: 1 1 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-menu li {
        margin-right: 0;
    }
    
    .cart-icon {
        padding: 8px 15px;
    }
}

/* Updated Navigation Styles */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-header {
    display: none;
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
}

.hamburger {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin-right: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 15px 0;
    position: relative;
    transition: color 0.3s;
    display: block;
}

.nav-menu a:hover {
    color: #3949ab;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3949ab;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active {
    color: #3949ab;
}

.nav-menu a.active::after {
    width: 100%;
}

.mobile-cart-link {
    display: none;
}

.mobile-cart-link a {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f0f0f0;
    padding: 10px 15px !important;
    border-radius: 4px;
}

/* ==============================================
   Mobile Menu (Hamburger + Slide/Show menu)
============================================== */

/* Hide menu by default on mobile */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Hamburger icon styling */
.nav-toggle {
    display: none;                    /* hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 0;
}

.hamburger {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Mobile view */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;                /* show hamburger on mobile */
    }

    .nav-menu {
        display: none;                /* hide menu by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 1rem 0;
    }

    /* Show menu when active */
    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        text-align: center;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid #eee;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        font-size: 1.1rem;
        display: block;
    }

    /* Optional: hamburger becomes X when open */
    .nav-toggle.active .hamburger:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .hamburger:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Optional: overlay / backdrop when menu is open (nice touch) */
.nav-menu.active::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
    display: none;
}

@media (max-width: 768px) {
    .nav-menu.active::before {
        display: block;
    }
}

.nav-toggle {
    display: none;           /* hidden by default (desktop) */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
}

.hamburger {
    width: 100%;
    height: 3px;
    background-color: #333;   /* ← make sure color contrasts with background */
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;        /* ← this must be present */
    }
}
.hamburger {
    background-color: red !important;  /* bright color for debugging */
    height: 4px !important;
}

@media (max-width: 768px) {
    .main-nav .nav-toggle {
        display: flex !important;
    }
}

.nav-toggle {
    display: none;                /* hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 3px;
    background-color: #000;       /* change to your theme color */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    /* Optional: X animation when open */
    .nav-toggle.active .hamburger {
        background: transparent;
    }

    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg) translate(0, 8px);
    }

    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg) translate(0, -8px);
    }
}

/* Updated Product Price Styles for Index Page */
.product-card .product-price {
    font-size: 18px;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.product-card .current-price {
    font-size: 20px;
    font-weight: 800;
    color: #d32f2f;
}

.product-card .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
}

.product-card .discount {
    background-color: #d32f2f;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Keep Product Page Prices Larger */
.product-details .current-price {
    font-size: 36px;
    font-weight: bold;
    color: #1a237e;
    margin-right: 15px;
}

.product-details .original-price {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
    margin-right: 15px;
}

.product-details .discount {
    background-color: #ff4081;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.alert-for-marker h3{
    margin-left: 145px;
    color: #d32f2f;
}

/* Responsive adjustments for product card prices */
@media (max-width: 768px) {
    .product-card .product-price {
        font-size: 16px;
        gap: 6px;
    }
    .alert-for-marker h3{
        margin-left: 20px;
    }
    
    .product-card .current-price {
        font-size: 18px;
    }
    
    .product-card .original-price {
        font-size: 13px;
    }
    
    .product-card .discount {
        font-size: 11px;
        padding: 2px 6px;
    }
}

@media (max-width: 576px) {
    .product-card .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .product-card .current-price {
        font-size: 17px;
    }
}
