/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container > h1 {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 15px;
    color: #000000;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-size: 2.2em;
    background: linear-gradient(135deg, #000000 0%, #333333 50%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: text-shimmer 3s ease infinite;
}

@keyframes text-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.container > h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #d32f2f, #ff5252, #d32f2f);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: shimmer 2s infinite;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.4);
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 2px solid #d32f2f;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    max-height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #d32f2f;
}

.cart-link {
    color: #d32f2f !important;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 3px solid #d32f2f;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #000000;
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #333;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #d32f2f;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #b71c1c;
}

.btn-secondary {
    background-color: #000000;
}

.btn-secondary:hover {
    background-color: #333;
}

.btn-primary {
    background-color: #d32f2f;
}

.btn-danger {
    background-color: #d32f2f;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.08),
        0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f, #ff5252, #d32f2f);
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform 0.4s;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(211, 47, 47, 0.2),
        0 4px 15px rgba(211, 47, 47, 0.15),
        0 2px 6px rgba(0,0,0,0.1);
    border-color: #d32f2f;
}

.product-card:hover::before {
    transform: scaleX(1);
    animation: shimmer 2s infinite;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
}

.sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #d32f2f 0%, #ff5252 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 4px 15px rgba(211, 47, 47, 0.4),
        0 2px 6px rgba(211, 47, 47, 0.3);
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4), 0 2px 6px rgba(211, 47, 47, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5), 0 3px 8px rgba(211, 47, 47, 0.4);
    }
}

.product-info {
    padding: 25px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.9) 100%);
    position: relative;
}

.product-info::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d32f2f, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-info::after {
    opacity: 1;
}

.product-info h3 {
    margin-bottom: 12px;
    color: #000000;
    font-weight: 700;
    font-size: 1.2em;
    transition: color 0.3s;
}

.product-card:hover .product-info h3 {
    color: #d32f2f;
}

.product-category {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    margin: 15px 0;
}

.price {
    font-size: 1.5em;
    font-weight: bold;
    color: #000000;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.price-sale {
    font-size: 1.5em;
    font-weight: bold;
    color: #d32f2f;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.product-images img {
    width: 100%;
    border-radius: 8px;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}

.thumbnail:hover {
    border-color: #d32f2f;
}

.product-info-detail h1 {
    margin-bottom: 20px;
    color: #000000;
}

.product-description {
    margin: 20px 0;
    line-height: 1.8;
}

.product-actions {
    margin: 30px 0;
}

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector input {
    width: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.stock-status {
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.in-stock {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.low-stock {
    background-color: #fff3e0;
    color: #e65100;
}

.out-of-stock {
    background-color: #ffebee;
    color: #c62828;
}

/* Cart */
.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cart-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-summary {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    height: fit-content;
}

.cart-summary h2 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row.total {
    font-size: 1.3em;
    font-weight: bold;
    border-top: 2px solid #d32f2f;
    margin-top: 10px;
    padding-top: 15px;
}

.coupon-section {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.coupon-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

/* Checkout */
.checkout-content {
    max-width: 800px;
    margin: 40px auto;
}

.checkout-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.checkout-form h2 {
    margin-bottom: 20px;
    color: #000000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #000000;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.order-summary-checkout {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Footer */
footer {
    background-color: #000000;
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: #d32f2f;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #d32f2f;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

/* Products Layout with Sidebar */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    margin: 40px 0;
    align-items: start;
    position: relative;
}

.products-layout::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background: 
        radial-gradient(circle at 20% 50%, rgba(211, 47, 47, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(211, 47, 47, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Modern Centered Search Bar */
.products-search-container {
    margin: 40px 0 50px;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.products-search-form {
    width: 100%;
    max-width: 700px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 4px 4px 4px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-icon {
    color: #999;
    flex-shrink: 0;
    transition: color 0.3s;
}

.search-wrapper:focus-within .search-icon {
    color: #d32f2f;
}

.search-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(211, 47, 47, 0.1), transparent);
    transition: left 0.5s;
}

.search-wrapper:focus-within {
    border-color: #d32f2f;
    box-shadow: 0 6px 30px rgba(211, 47, 47, 0.15);
    transform: translateY(-2px);
}

.search-wrapper:focus-within::before {
    left: 100%;
}

.search-input {
    flex: 1;
    padding: 16px 12px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: #333;
    font-weight: 400;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-btn {
    padding: 16px 40px;
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

/* Modern Products Sidebar */
.products-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    padding: 35px;
    border-radius: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.08),
        0 2px 10px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.9);
    border: 2px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.products-sidebar:hover {
    box-shadow: 
        0 15px 50px rgba(0,0,0,0.12),
        0 4px 15px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-2px);
    border-color: #e8e8e8;
}

.products-sidebar h2 {
    margin-bottom: 30px;
    color: #000000;
    font-size: 1.5em;
    font-weight: 800;
    position: relative;
    padding-bottom: 18px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    font-size: 1.2em;
}

.products-sidebar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f, #ff5252, #d32f2f);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #444;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid transparent;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.5);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.category-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #d32f2f, #ff5252);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

.category-list a::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d32f2f;
    transform: translateY(-50%) scale(0);
    transition: transform 0.3s;
    opacity: 0;
}

.category-list a:hover {
    background: linear-gradient(90deg, rgba(211, 47, 47, 0.12) 0%, rgba(211, 47, 47, 0.05) 100%);
    color: #d32f2f;
    transform: translateX(8px);
    box-shadow: 
        0 4px 12px rgba(211, 47, 47, 0.15),
        0 2px 6px rgba(211, 47, 47, 0.1);
    border-left-color: transparent;
}

.category-list a:hover::before {
    transform: scaleY(1);
}

.category-list a:hover::after {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.category-list a.active {
    background: linear-gradient(135deg, #d32f2f 0%, #ff5252 50%, #d32f2f 100%);
    background-size: 200% 100%;
    color: #ffffff;
    border-left-color: #b71c1c;
    font-weight: 700;
    box-shadow: 
        0 6px 20px rgba(211, 47, 47, 0.4),
        0 2px 8px rgba(211, 47, 47, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateX(0);
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.category-list a.active::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, #b71c1c, #c62828);
    box-shadow: 0 0 10px rgba(183, 28, 28, 0.5);
}

.category-list a.active::after {
    background: #ffffff;
    transform: translateY(-50%) scale(1);
    opacity: 1;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.category-list a.active:hover {
    transform: translateX(0);
    box-shadow: 
        0 8px 25px rgba(211, 47, 47, 0.5),
        0 4px 12px rgba(211, 47, 47, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Products Main Area */
.products-main {
    min-width: 0; /* Prevents grid overflow */
    position: relative;
}

.products-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -25px;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #d32f2f, transparent);
    opacity: 0.3;
    border-radius: 2px;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1em;
}

/* Content Sections */
.content-section {
    max-width: 800px;
    margin: 40px auto;
    line-height: 1.8;
}

.content-section h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #d32f2f;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Order Complete */
.order-complete {
    text-align: center;
    padding: 60px 20px;
}

.order-details {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 600px;
    text-align: left;
}

.order-details h2 {
    margin-bottom: 20px;
    color: #d32f2f;
}

.order-details p {
    margin-bottom: 10px;
}

.payment-note {
    background-color: #fff3e0;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .products-sidebar {
        position: static;
        order: 2;
        border-radius: 12px;
    }
    
    .products-main {
        order: 1;
    }
    
    .search-wrapper {
        flex-direction: column;
        border-radius: 12px;
        padding: 8px;
    }
    
    .search-input {
        padding: 14px 20px;
    }
    
    .search-btn {
        width: 100%;
        border-radius: 8px;
        padding: 14px 30px;
    }
    
    .products-search-container {
        margin: 30px 0 40px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}
