/**
 * Product Card Styles for ShopLT
 * Product cards, product details, etc.
 */

/* === Product Card === */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* === Product Image === */
.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f9fafb;
    overflow: hidden;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

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

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

.product-card-badge.new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.product-card-badge.sale {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.product-card-badge.hit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* === Product Wishlist Button === */
.product-card-wishlist {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}

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

.product-card-wishlist:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.product-card-wishlist svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.product-card-wishlist:hover svg {
    color: #ef4444;
}

.product-card-wishlist.active svg {
    color: #ef4444;
    fill: #ef4444;
}

/* === Product Content === */
.product-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-card-title {
    color: #667eea;
}

.product-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-card-feature {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

/* === Product Price === */
.product-card-price {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.product-card-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.product-card-price-old {
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-card-price-discount {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ef4444;
    background: #fee2e2;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

/* === Product Card List View === */
.product-card.list-view {
    flex-direction: row;
}

.product-card.list-view .product-card-image {
    width: 200px;
    padding-top: 0;
    flex-shrink: 0;
}

.product-card.list-view .product-card-content {
    padding: 1.25rem;
}

@media (max-width: 640px) {
    .product-card.list-view {
        flex-direction: column;
    }
    
    .product-card.list-view .product-card-image {
        width: 100%;
        padding-top: 100%;
    }
}

/* === Product Detail Page === */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem auto;
}

@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.product-gallery {
    position: sticky;
    top: 2rem;
}

.product-gallery-main {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-gallery-main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.product-gallery-thumbnail {
    position: relative;
    padding-top: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.product-gallery-thumbnail:hover {
    border-color: #667eea;
}

.product-gallery-thumbnail.active {
    border-color: #667eea;
}

.product-gallery-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === Product Info === */
.product-info {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.product-info-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.product-sku {
    font-size: 0.9rem;
    color: #6b7280;
}

.product-price-block {
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.product-price-old {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 1rem;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.product-availability.available {
    color: #10b981;
}

.product-availability.limited {
    color: #f59e0b;
}

.product-availability.out-of-stock {
    color: #ef4444;
}

/* === Quantity Selector === */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.quantity-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #f9fafb;
    color: #1f2937;
}

.quantity-input {
    width: 3rem;
    text-align: center;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 1rem;
    font-weight: 500;
}

.quantity-input:focus {
    outline: none;
}

/* === Action Buttons === */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-actions .btn {
    flex: 1;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-buy-now {
    background: #10b981;
    color: white;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-buy-now:hover {
    background: #059669;
}

/* === Product Tabs === */
.product-tabs {
    margin-top: 2rem;
}

.product-tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.product-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.product-tab-btn:hover {
    color: #1f2937;
}

.product-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.product-tab-content {
    display: none;
}

.product-tab-content.active {
    display: block;
}

.product-description {
    line-height: 1.8;
    color: #4b5563;
}

.product-description h2,
.product-description h3 {
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.product-description ul,
.product-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}
