/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ebc156;
    --accent-color: #e9d26c;
    --light-color: #d8c975;
    --dark-color: #3A3A3A;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: rgb(247, 250, 55);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

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

.btn-cart:hover {
    background-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Admin Access Button */
.admin-access {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.admin-btn {
    background-color: var(--dark-color);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
}

.admin-btn:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: scale(1.05);
}

/* Admin Login Modal */
.admin-login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1002;
    backdrop-filter: blur(4px);
}

.admin-login-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.close-admin-login {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-admin-login:hover {
    color: var(--danger-color);
}

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

.admin-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.admin-login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

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

/* Admin Panel */
.admin-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1003;
    overflow-y: auto;
}

.admin-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user {
    font-weight: 500;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c82333;
}

.admin-tabs {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 20px;
    display: flex;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.admin-content {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stock Management */
.stock-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.stock-table table {
    width: 100%;
    border-collapse: collapse;
}

.stock-table th,
.stock-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stock-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.stock-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-status.low-stock {
    background: #fff3cd;
    color: #856404;
}

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.edit-stock-btn {
    background: var(--info-color);
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-stock-btn:hover {
    background: #138496;
}

/* Orders */
.orders-list {
    margin-top: 20px;
}

.order-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-id {
    font-weight: 600;
    color: var(--primary-color);
}

.order-date {
    color: #666;
    font-size: 14px;
}

.order-items {
    margin-bottom: 15px;
}

.order-product {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-total {
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: rgb(255, 255, 255);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    position: relative;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

nav ul li a:hover:after {
    width: 100%;
}

.cart-btn {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    z-index: 102;
}

.cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 103;
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

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

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Features */
.features {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.features-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.feature {
    flex: 0 0 calc(33.333% - 30px);
    text-align: center;
    padding: 30px;
    margin-bottom: 30px;
    background-color: var(--light-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Products */
.products {
    padding: 80px 0;
    background-color: var(--light-color);
}

.product-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    margin: 0 10px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stock-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background-color: white;
}

.testimonials-container {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    text-align: center;
    padding: 30px;
    margin: 20px 0;
    background-color: var(--light-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text:before, .testimonial-text:after {
    content: '"';
    font-size: 50px;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
}

.testimonial-text:before {
    top: -20px;
    left: -10px;
}

.testimonial-text:after {
    bottom: -40px;
    right: -10px;
}

.testimonial-author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Newsletter */
.newsletter {
    padding: 80px 0;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
}

.newsletter-form {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-col {
    flex: 0 0 calc(25% - 30px);
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--secondary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
    transform: translateX(100%);
}

.cart-modal.open {
    transform: translateX(0);
    display: block;
}

.cart-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 5px;
    margin-right: 15px;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cart-item-title {
    margin-bottom: 5px;
    font-weight: bold;
}

.cart-item-price {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: var(--light-color);
    border: none;
    cursor: pointer;
}

.item-quantity {
    width: 50px;
    height: 30px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ddd;
}

.cart-total {
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.cart-total-title {
    margin-bottom: 10px;
    font-weight: bold;
}

.cart-total-price {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: var(--primary-color);
}

/* Payment Modal */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1005;
    backdrop-filter: blur(4px);
}

.payment-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.payment-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.close-payment {
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.close-payment:hover {
    color: var(--secondary-color);
}

.payment-body {
    padding: 30px;
}

.payment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.payment-summary h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.order-items {
    margin-bottom: 15px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-total {
    text-align: right;
    padding-top: 10px;
    border-top: 2px solid var(--primary-color);
    font-size: 18px;
}

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

.form-section h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group.half {
    flex: 0 0 calc(50% - 7.5px);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(235, 193, 86, 0.2);
}

.payment-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Stock Edit Modal */
.stock-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1004;
    backdrop-filter: blur(4px);
}

.stock-edit-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stock-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.close-stock-edit {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-stock-edit:hover {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

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

.overlay.open {
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .feature {
        flex: 0 0 calc(50% - 30px);
    }
    
    .footer-col {
        flex: 0 0 calc(50% - 30px);
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group.half {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100%;
        background-color: var(--primary-color);
        padding: 80px 20px 20px;
        transition: right 0.3s;
        z-index: 101;
    }
    
    nav.open {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .feature {
        flex: 0 0 100%;
    }
    
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 5px;
    }
    
    .footer-col {
        flex: 0 0 100%;
    }
    
    .cart-modal {
        width: 100%;
    }
    
    .payment-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .payment-body {
        padding: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-tabs {
        overflow-x: auto;
    }
    
    .stock-table {
        overflow-x: auto;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .admin-access {
        bottom: 80px;
        right: 15px;
    }
    
    .admin-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}