/* Product Card Styles */
.product-card {
    position: relative;
    background-color: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-medium);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 350px;
    max-width: 320px;
    margin: 0 auto;
}

/* Desktop - Bigger product cards */
@media (min-width: 768px) {
    .product-card {
        min-height: 450px;
        max-width: none;
    }
}

@media (min-width: 1024px) {
    .product-card {
        min-height: 500px;
    }
}

@media (min-width: 1200px) {
    .product-card {
        min-height: 550px;
    }
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.sale {
    background-color: var(--accent-secondary);
    color: white;
}

.product-badge.new {
    background-color: var(--accent-tertiary);
    color: white;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    cursor: pointer;
}

/* Desktop - Bigger product images */
@media (min-width: 768px) {
    .product-image {
        padding-bottom: 110%; /* Taller aspect ratio */
    }
}

@media (min-width: 1024px) {
    .product-image {
        padding-bottom: 115%;
    }
}

@media (min-width: 1200px) {
    .product-image {
        padding-bottom: 120%;
    }
}

.product-image::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-image:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
}

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

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 8px rgba(131, 56, 236, 0.5);
    position: relative;
    padding-bottom: 0.75rem;
    line-height: 1.3;
    min-height: 2.6rem;
    word-wrap: break-word;
}

.product-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8257ff, transparent);
}

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

/* Desktop - Force 3 products per row */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        gap: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        gap: 3rem;
    }
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.original-price {
    color: var(--muted-text);
    text-decoration: line-through;
    font-size: 0.9rem;
}

.sale-price {
    color: #f72585;
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.sale-price::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #f72585, transparent);
}

/* Size Selection */
.size-selection {
    margin-bottom: 1rem;
}

.size-selection label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted-text);
}

.size-options {
    display: flex;
    gap: 0.5rem;
}

.size-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--muted-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.8rem;
}

.size-option:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

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

/* Product Buttons */
.product-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.add-to-cart-btn, .buy-now-btn {
    padding: 0.6rem 0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.add-to-cart-btn {
    background: linear-gradient(45deg, var(--accent-primary, #8257ff), #a178ff);
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(130, 87, 255, 0.3);
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.buy-now-btn {
    background: linear-gradient(45deg, #f72585, #b5179e);
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

.buy-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.buy-now-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover, .buy-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

/* Front/Back Image Container Styles */
.image-container {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    cursor: pointer;
}

/* Desktop - Bigger image containers */
@media (min-width: 768px) {
    .image-container {
        padding-bottom: 110%; /* Taller aspect ratio */
    }
}

@media (min-width: 1024px) {
    .image-container {
        padding-bottom: 115%;
    }
}

@media (min-width: 1200px) {
    .image-container {
        padding-bottom: 120%;
    }
}

.product-image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    backface-visibility: hidden;
}

.product-image-item.back-image {
    transform: rotateY(180deg);
}

.image-container.show-back .product-image-item.front-image {
    transform: rotateY(-180deg);
}

.image-container.show-back .product-image-item.back-image {
    transform: rotateY(0deg);
}

.image-toggle-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.image-container:hover .image-toggle-controls {
    opacity: 1;
}

.toggle-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(130, 87, 255, 0.9);
    border-color: #8257ff;
    transform: scale(1.1);
}

.toggle-btn.active {
    background: #8257ff;
    border-color: #8257ff;
}

.view-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.image-container:hover .view-indicator {
    opacity: 1;
}

/* Desktop - Bigger toggle controls */
@media (min-width: 768px) {
    .toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .view-indicator {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (min-width: 1024px) {
    .toggle-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .view-indicator {
        font-size: 13px;
        padding: 7px 14px;
    }
}
