/* ========== Brand Colors ========== */
:root {
    --ea-red: #E41B23;
    --ea-green: #2D572C;
    --ea-yellow: #F9D423;
    --ea-blue: #0063B1;
    --ea-orange: #F26522;
    --dark: #1A1A1A;
    --light: #F8F9FA;
    --gradient-primary: linear-gradient(135deg, var(--ea-red), var(--ea-orange));
    --gradient-secondary: linear-gradient(135deg, var(--ea-green), var(--ea-blue));
    
    /* Additional utility colors */
    --success: #28a745;
    --danger: #dc3545;
    --warning: #fd7e14;
    --info: #17a2b8;
}

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

body.products-page {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== Layout Components ========== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 2;
}

.hero-text-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 800px;
    padding: 20px;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.scroll-down-arrow {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* ========== Products Grid ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* ========== Product Card ========== */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-media {
    position: relative;
    height: 280px;
    overflow: hidden;
}

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

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.price-badge {
    background: var(--ea-red);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.stock-badge {
    background: var(--ea-yellow);
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    margin: 15px;
    padding-bottom: 5px;
    overflow-x: auto;
}

.thumb-card {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumb-card:hover {
    border-color: var(--ea-blue);
}

.thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-description {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ========== Color & Size Selectors ========== */
.selector-container {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.selector-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-options, .size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.color-option:hover:not(.out-of-stock) {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.color-option.selected {
    border: 2px solid var(--ea-blue);
    box-shadow: 0 0 0 3px rgba(0, 99, 177, 0.3);
}

.size-option {
    padding: 8px 15px;
    min-width: 35px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    background: white;
    color: var(--dark);
}

.size-option:hover:not(.out-of-stock) {
    background: #f1f1f1;
    transform: translateY(-1px);
}

.size-option.selected {
    background-color: var(--ea-blue);
    color: white;
    border-color: var(--ea-blue);
}

/* Out of stock styles */
.color-option.out-of-stock,
.size-option.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.color-option.out-of-stock::after,
.size-option.out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--danger);
    transform: rotate(-45deg);
    transform-origin: center;
}

/* Tooltip styles */
.color-option[title]:hover::after, 
.size-option[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 8px;
}

/* ========== Buttons ========== */
.product-footer {
    margin-top: 20px;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #d11920, #e05a1e);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.out-of-stock-btn {
    width: 100%;
    background: #6c757d;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: not-allowed;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Loading states */
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-success {
    background: var(--success) !important;
}

/* ========== Floating Cart Button ========== */
.floating-elements {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.cart-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
    font-size: 24px;
}

.cart-float-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--ea-yellow);
    color: var(--dark);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: 500px;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 400px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .cart-float-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* Variant Out-of-Stock Overlay */
.variant-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}
.variant-overlay.show {
  opacity: 1;
}
.product-card {
  position: relative;
}

/* Add to cart button states */
.btn-loading {
    background-color: #6c757d !important;
    cursor: wait !important;
}

.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* Cart count animation */
.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Variant overlay styling */
.variant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 8px;
    z-index: 10;
}

/* Color options */
.color-option.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #007bff;
}

/* Size options */
.size-option.selected {
    background-color: #007bff;
    color: white;
}
