/* Import base styles from index.css */
@import url('index.css');

/* Override body opacity for page load */
body {
    opacity: 1 !important;
}

/* Ensure header is visible */
header {
    position: relative;
    z-index: 1000;
}

/* Store Closed Overlay */
.store-closed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
}

.store-closed-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

.store-closed-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ff4824, #ff0b4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.store-closed-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #888;
    line-height: 1.7;
}

.store-closed-content p:last-of-type {
    margin-bottom: 2rem;
    font-weight: 600;
    color: #fff;
}

.store-closed-actions {
    margin-top: 2rem;
}

.btn-back-home {
    display: inline-block;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-back-home:hover {
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Store Hero Section */
.store-hero {
    padding: 140px 0 80px;
    text-align: center;
    background: transparent;
    border-top: 2px solid transparent;
    background-image: linear-gradient(#0a0a0a, #0a0a0a), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.store-hero .hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ff4824, #ff0b4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.store-hero .hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    max-width: 700px;
    margin: 0 auto;
}

/* Store Filters Section */
.store-filters {
    padding: 60px 0 40px;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #888;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: rgba(255, 72, 36, 0.5);
    color: #fff;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.sort-controls select {
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

.sort-controls select option {
    background: rgba(40, 40, 40, 0.98) !important;
    color: #e0e0e0 !important;
    padding: 8px 12px !important;
}

.sort-controls select option:hover,
.sort-controls select option:focus,
.sort-controls select option:checked {
    background: rgba(255, 72, 36, 0.2) !important;
    color: #ffffff !important;
}

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

.cart-btn {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Products Grid Section */
.products-grid {
    padding: 40px 0 80px;
    background: #0a0a0a;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: rgba(255, 255, 255, 0.01);
}

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

/* Jersey hover: front -> back fade */
.jersey-image {
    position: relative;
    height: 320px; /* taller preview so whole jersey is visible */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
}
.jersey-image img {
    position: absolute; /* overlay images so they can fade */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-height: 92%;
    max-width: 92%;
    object-fit: contain; /* ensure whole jersey is visible */
    transition: opacity 0.35s ease, transform 0.25s ease;
    padding: 6px;
    display: block;
    z-index: 1;
}
.jersey-image img.back {
    opacity: 0;
}
.jersey-image:hover img.front {
    opacity: 0;
    transform: scale(1.01);
}
.jersey-image:hover img.back {
    opacity: 1;
    transform: scale(1.01);
}

/* Jersey-specific hover color: darker gray */
.jersey-card:hover {
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.jersey-card .product-overlay {
    background: rgba(50, 50, 50, 0.1);
    z-index: 3; /* ensure overlay and quick view stay above images */
}
.jersey-card:hover .product-overlay {
    background: rgba(50, 50, 50, 0.2);
}

/* ensure front/back stacking order */
.jersey-image img.front { z-index: 2; }
.jersey-image img.back { z-index: 1; opacity: 0; }
.jersey-image:hover img.front { opacity: 0; }
.jersey-image:hover img.back { opacity: 1; }

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

/* Fix: ensure jersey images keep their centering translate when hovered (avoid being pushed) */
.jersey-image img {
    transform: translate(-50%, -50%) scale(1);
}
.product-card:hover .jersey-image img {
    transform: translate(-50%, -50%) scale(1.01);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 24px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #fff;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ff4824, #ff0b4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.product-options {
    margin-bottom: 1.5rem;
}

.size-select,
.color-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    font-size: 1rem;
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    cursor: pointer;
}

.size-select option,
.color-select option {
    background: rgba(40, 40, 40, 0.98) !important;
    color: #e0e0e0 !important;
    padding: 8px 12px !important;
}

.size-select option:hover,
.size-select option:focus,
.size-select option:checked,
.color-select option:hover,
.color-select option:focus,
.color-select option:checked {
    background: rgba(255, 72, 36, 0.2) !important;
    color: #ffffff !important;
}

.size-select:focus,
.color-select:focus {
    outline: none;
    border-color: rgba(255, 72, 36, 0.5);
}

.option-text {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

.limited-badge {
    background: rgba(255, 72, 36, 0.2);
    color: #ff4824;
    border: 1px solid rgba(255, 72, 36, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

.add-to-cart-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.add-to-cart-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.add-to-cart-btn:disabled {
    background: rgba(255, 255, 255, 0.01);
    color: #444;
    cursor: not-allowed;
}

/* Store Info Section */
.store-info {
    padding: 80px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #fff;
}

.info-card p {
    color: #888;
    line-height: 1.7;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
}

.cart-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-header h3 {
    margin: 0;
    color: #fff;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}

.close-cart:hover {
    color: #fff;
}

.cart-items {
    padding: 1rem 2rem;
    min-height: 200px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-info {
    flex: 1;
    margin-left: 1rem;
}

.cart-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #fff;
}

.cart-item-price {
    background: linear-gradient(90deg, #ff4824, #ff0b4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.cart-footer {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-total {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.25rem;
    color: #fff;
}

.checkout-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.checkout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), linear-gradient(90deg, #ff4824, #ff0b4e);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 2000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-quick-view {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    z-index: 10;
}

.close-quick-view:hover {
    color: #fff;
}

.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.quick-view-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    min-height: 300px;
}

.quick-view-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.quick-view-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-view-info h2 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.quick-view-info .price {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ff4824, #ff0b4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.quick-view-info p {
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-primary {
    background: rgba(255, 72, 36, 0.2);
    color: #ff4824;
    border: 1px solid rgba(255, 72, 36, 0.3);
    padding: 12px 24px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255, 72, 36, 0.3);
    border-color: rgba(255, 72, 36, 0.5);
}

/* No Payment Modal */
.no-payment-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 3000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

.no-payment-modal[style*="display: flex"] {
    display: flex !important;
}

.no-payment-content {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    max-width: 500px;
    width: 90%;
    padding: 3rem 2rem 2rem !important;
    position: relative;
    text-align: center;
}

.no-payment-content h2 {
    color: #fff !important;
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.no-payment-content p {
    color: #888 !important;
    margin-bottom: 1rem !important;
    line-height: 1.6 !important;
}

.close-no-payment {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: none !important;
    border: none !important;
    font-size: 2rem !important;
    color: #888 !important;
    cursor: pointer !important;
}

.close-no-payment:hover {
    color: #fff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2.5rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .category-filters {
        justify-content: center;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .products {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .product-info {
        padding: 1.5rem;
    }

    .cart-content {
        width: 95%;
    }

    .cart-header,
    .cart-items,
    .cart-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 100px 0 60px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .store-filters,
    .products-grid,
    .store-info {
        padding: 50px 0;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        gap: 1rem;
    }

    .category-filters {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-btn {
        width: 100%;
        text-align: center;
    }

    .product-info {
        padding: 1rem;
    }

    .product-image {
        height: 200px;
    }

    /* Make jersey preview a bit shorter on small screens */
    .jersey-image {
        height: 220px;
    }
}
