* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #457b9d;
    --light: #f1faee;
    --dark: #1d3557;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #2d5a3d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--secondary) 0%, #264573 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

nav a:hover,
nav a.active {
    color: white;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.cart-icon {
    background: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #264573 100%);
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/><circle cx="50" cy="50" r="25" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 200px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 600px;
}

.category-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--secondary);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Products Section */
.products-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    position: relative;
}

.sale-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-content {
    padding: 1.25rem;
}

.product-brand {
    display: inline-block;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.product-content p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.price-original {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart:hover {
    background: var(--primary);
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--success) 0%, #3d7a52 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 3rem;
}

.promo-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.promo-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Brands Section */
.brands-section {
    margin-bottom: 3rem;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.brand-logo {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Product Detail Page */
.product-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-gallery {
    background: var(--light-gray);
    border-radius: 12px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.product-info h1 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.product-info .product-brand {
    margin-bottom: 1rem;
}

.product-info .price-current {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: block;
}

.product-info p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.size-selector {
    margin-bottom: 1.5rem;
}

.size-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.size-options {
    display: flex;
    gap: 0.5rem;
}

.size-options button {
    width: 50px;
    height: 50px;
    border: 2px solid var(--light-gray);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.size-options button:hover,
.size-options button.selected {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    font-weight: 600;
    color: var(--secondary);
}

.quantity-selector input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
}

.product-info .add-to-cart {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Features List */
.features-list {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

.features-list h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.features-list ul {
    list-style: none;
}

.features-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray);
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
}

.social-icon:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cart Modal
   ========================================================================== */

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: flex-end;
}

.cart-modal.active {
    display: flex;
}

.cart-modal-content {
    background: white;
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.cart-modal-header h2 {
    font-size: 1.5rem;
    color: var(--secondary);
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
}

.close-cart:hover {
    color: var(--secondary);
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.cart-empty p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
}

.cart-item-details h4 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.cart-item-brand,
.cart-item-size {
    font-size: 0.8rem;
    color: var(--gray);
    margin: 0;
}

.cart-item-price {
    font-weight: 600;
    color: var(--secondary);
    margin: 0.5rem 0 0;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--light-gray);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.quantity-controls button:hover {
    background: var(--light-gray);
}

.quantity-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
}

.remove-item:hover {
    color: var(--primary-dark);
}

.cart-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--light-gray);
    background: #f8f9fa;
}

.cart-summary {
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--gray);
}

.summary-row.total {
    border-top: 1px solid var(--light-gray);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.checkout-btn {
    width: 100%;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Product Page Enhancements
   ========================================================================== */

.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.color-selector {
    margin-bottom: 1.5rem;
}

.color-options {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.selected {
    border-color: var(--secondary);
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.in-stock {
    color: var(--success);
    font-weight: 600;
}

.stock-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.product-guarantees {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-gray);
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.guarantee-icon {
    font-size: 1.25rem;
}

.related-products {
    margin-top: 3rem;
}

.related-products .products-grid {
    margin-top: 1.5rem;
}

/* ==========================================================================
   Product Card Clickable
   ========================================================================== */

.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.product-card .add-to-cart {
    transition: background 0.3s ease;
}