/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

header .container {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background-color: #000;
    box-sizing: border-box;
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.hero-container {
    width: 100%;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4500;
    text-decoration: none;
    transition: color 0.3s;
}

.logo:hover {
    color: #e63900;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff4500;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.search-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
}

.search-bar input {
    width: 220px;
    padding: 0.65rem 0.9rem;
    border-radius: 30px;
    border: 1px solid #444;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.search-bar input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-bar button {
    padding: 0.7rem 1rem;
    border-radius: 30px;
    border: none;
    background: #ff4500;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.25s ease;
}

.search-bar button:hover {
    background: #e63900;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero section */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-top: 80px; /* Account for fixed navbar */
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9));
    max-width: 50%;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 2;
}

.slide-content h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    margin-top: 0;
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    background-color: #ff4500;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e63900;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.slider-nav {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3;
}

.slider-nav button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.slider-nav button:hover {
    background: rgba(255, 255, 255, 1);
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background: #ff4500;
}

/* Products section */
.products {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    margin-top: 80px; /* Account for fixed navbar */
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #000;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #000;
}

.product-price {
    font-size: 1.5rem;
    color: #ff4500;
    margin-bottom: 1rem;
}

.product-description {
    margin-bottom: 1rem;
    color: #666;
}

.add-to-cart {
    background-color: #ff4500;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #e63900;
}

/* Footer */
footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .search-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }

    .hamburger {
        display: block;
        order: 3;
    }

    nav {
        order: 4;
    }

    .search-bar {
        display: flex;
        order: 5;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 0 20px;
        justify-content: center;
        gap: 0.5rem;
        z-index: 150;
        flex-wrap: wrap;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
        pointer-events: none;
    }

    .search-bar.visible {
        max-height: 160px;
        opacity: 1;
        padding: 1rem 20px;
        pointer-events: auto;
    }

    .search-bar input {
        width: calc(100% - 122px);
        max-width: 100%;
    }

    .search-bar button {
        width: 110px;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #000;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero {
        min-height: 350px;
        height: 350px;
        padding-bottom: 0;
        margin-top: 80px;
    }
    
    .slide {
        position: relative;
        flex-direction: column;
        height: 350px;
        align-items: stretch;
        justify-content: flex-end;
    }
    
    .slide-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
        text-align: left;
        padding: 0.6rem 0.8rem 0.8rem;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.95));
        margin: 0;
        height: auto;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
        margin-top: 0;
        margin-bottom: 0.4rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .slide-image {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 350px;
        background-size: cover;
        background-position: center;
        z-index: 1;
    }
    
    .slider-nav {
        position: absolute;
        bottom: 110px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 0.8rem;
        z-index: 3;
    }
    
    .slider-nav button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .dots {
        gap: 0.4rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 0.95rem 1rem;
    border-radius: 10px;
    color: #fff;
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #e63900;
}

.toast.hide {
    opacity: 0;
    transform: translateY(10px);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* View Styles */
#home-view, #products-view {
    margin-top: 80px; /* Account for fixed navbar */
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    color: #000;
}

.cart-item-details p {
    margin: 0;
    color: #666;
}

.remove-btn {
    background-color: #ff4500;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.remove-btn:hover {
    background-color: #e63900;
}

.cart-total {
    text-align: right;
    font-size: 1.2rem;
    margin: 20px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.checkout-btn {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.checkout-btn:hover {
    background-color: #218838;
}

/* About and Contact sections */
.about, .contact {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 20px;
    text-align: center;
}

.about h2, .contact h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.about p, .contact p {
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1rem auto;
}

/* Products View Styles */
.products-header {
    background: linear-gradient(135deg, #ff4500, #ff6b35);
    color: white;
    padding: 3rem 20px;
    text-align: center;
    position: relative;
}

.products-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.products-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: white;
    color: #ff4500;
}

.products-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.product-filter-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.product-filter-panel .filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.product-filter-panel label {
    font-weight: 600;
    color: #333;
}

.product-filter-panel select {
    padding: 0.85rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #333;
    min-width: 180px;
}

.no-products-message {
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.product-stock {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    color: #28a745;
    font-weight: 600;
}

.product-stock.out-of-stock {
    color: #d63031;
}

.show-more-btn {
    display: inline-block;
    background-color: #ff4500;
    color: #fff;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 35px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(255, 69, 0, 0.2);
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    margin: 0 auto;
}

.show-more-btn:hover {
    background-color: #e63900;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(230, 57, 0, 0.25);
}

.show-more-container {
    text-align: center;
}

.add-to-cart:disabled {
    background: #bbb;
    cursor: not-allowed;
}

.product-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Mobile responsive for full products view */
@media (max-width: 768px) {
    .products-header h1 {
        font-size: 2rem;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }
    
    .product-grid-full {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Checkout Modal Styles */
.checkout-modal-content {
    max-width: 1000px;
    width: 95%;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 20px;
}

.checkout-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ff4500;
    padding-bottom: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff4500;
    box-shadow: 0 0 5px rgba(255, 69, 0, 0.3);
}

.order-summary {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ff4500;
    padding-bottom: 5px;
}

.checkout-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.checkout-item img {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.checkout-item-details {
    flex: 1;
}

.checkout-item-details h4 {
    margin: 0 0 3px 0;
    font-size: 14px;
    color: #333;
}

.checkout-item-details p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.checkout-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.checkout-total div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.checkout-total .total {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.place-order-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.place-order-btn:hover {
    background: #218838;
}

.place-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.checkout-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* Mobile responsive for checkout */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .checkout-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}