/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #000000; /* Black - replaces green */
    --secondary: #333333; /* Dark Gray */
    --accent: #FFFFFF; /* White for contrast */
    --background: #F5F5F5; /* Light Gray */
    --text: #333333; /* Dark Gray */
    --success: #006064; /* Dark Teal */
    --error: #B71C1C; /* Dark Red */
    --hover-darken: rgba(0, 0, 0, 0.1);
    --hover-lighten: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--background);
    font-weight: 400;
}

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

a {
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

img {
    max-width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--accent);
    padding: 12px 20px;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

.btn:hover {
    background-color: #333; /* Slightly lighter black on hover */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--background);
    color: var(--text);
    border: 1px solid var(--text);
}

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

/* Header Styles */
header {
    background-color: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
}

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

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

nav ul li a {
    font-weight: 500;
    color: var(--accent);
    transition: var(--transition);
}

nav ul li a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.cart-count {
    display: inline-block;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 20px;
    margin-left: 5px;
    font-weight: 700;
}

/* Page Header */
.page-header {
    background-color: var(--background);
    padding: 60px 0;
    text-align: center;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    background-color: var(--background);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

/* Featured Products */
.featured-products {
    padding: 80px 0;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    background-color: var(--accent);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.product-card h3 {
    padding: 20px 20px 5px;
    font-weight: 600;
}

.product-card .price {
    padding: 0 20px 20px;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

.product-card .btn {
    margin: 0 20px 20px;
}

/* Products Page */
.products {
    padding: 60px 0 80px;
}

.loading-indicator, .error-message, .no-products {
    text-align: center;
    padding: 40px;
    width: 100%;
}

.loading-indicator {
    font-size: 1.1rem;
    color: var(--text);
}

.error-message {
    font-size: 1.1rem;
    color: var(--error);
    background-color: rgba(183, 28, 28, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.no-products {
    font-size: 1.1rem;
    color: var(--text);
    font-style: italic;
}

/* Product Detail Page */
.product-detail {
    padding: 60px 0 80px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.product-info h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.product-info .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.7;
}

.product-options {
    margin-bottom: 30px;
}

.size-selection, .quantity-selection {
    margin-bottom: 15px;
}

.size-selection label, .quantity-selection label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.size-selection select, .quantity-selection input {
    padding: 8px;
    width: 100%;
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-to-cart-btn {
    padding: 12px 20px;
    font-size: 1.1rem;
}

/* Cart Styles */
.cart {
    padding: 60px 0 80px;
}

.cart-empty {
    text-align: center;
    padding: 40px;
    background-color: var(--background);
    border-radius: 8px;
}

.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: var(--accent);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.cart-table th {
    text-align: left;
    padding: 15px;
    background-color: var(--primary);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

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

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-product-info h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.quantity-btn {
    background-color: var(--background);
    color: var(--text);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.quantity {
    width: 40px;
    text-align: center;
    margin: 0 10px;
    font-weight: 600;
}

.btn-remove {
    background-color: transparent;
    color: var(--text);
    border: none;
    padding: 5px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.btn-remove:hover {
    opacity: 1;
    color: var(--error);
}

.cart-subtotal-label {
    font-weight: 600;
    text-align: right;
    font-size: 1.2rem;
}

.cart-subtotal-amount {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

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

/* Checkout Styles */
.checkout {
    padding: 60px 0 80px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

.checkout-form h3,
.order-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

.order-summary {
    background-color: var(--background);
    padding: 30px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    box-shadow: var(--card-shadow);
}

.order-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.order-item-details {
    flex-grow: 1;
    padding-right: 10px;
}

.order-item-quantity {
    color: #777;
    font-size: 0.9rem;
}

.order-item-name {
    font-weight: 500;
}

.order-item-price {
    font-weight: 600;
}

.order-totals {
    margin-top: 20px;
    padding-top: 15px;
}

.order-subtotal,
.order-shipping,
.order-tax {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #666;
}

.order-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 700;
    font-size: 1.2rem;
}

#place-order-btn {
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Order Confirmation Styles */
.order-confirmation {
    padding: 60px 0 80px;
}

.confirmation-message {
    text-align: center;
    margin-bottom: 50px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: var(--primary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.confirmation-message h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.order-details {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--accent);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.order-info,
.shipping-info {
    padding: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.order-info h3,
.shipping-info h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.info-row {
    display: flex;
    margin-bottom: 10px;
}

.info-label {
    width: 150px;
    font-weight: 500;
    color: #777;
}

.info-value {
    font-weight: 500;
}

.info-value.paid {
    color: var(--success);
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Loading Animation */
body.loading {
    position: relative;
}

body.loading::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}

body.loading::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Media Queries */
@media screen and (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        display: none;
    }
    
    .cart-product img {
        width: 60px;
        height: 60px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        width: 100%;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .order-details {
        padding: 15px;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .btn {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--accent);
    padding: 40px 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: var(--accent);
    margin: 0 15px;
    opacity: 0.8;
    font-weight: 400;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Print Styles */
@media print {
    header,
    footer,
    .page-header,
    .confirmation-actions {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .confirmation-icon {
        border: 2px solid #4CAF50;
        color: #4CAF50;
        background: none;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .order-confirmation {
        padding: 0;
    }
} 