/* Enhanced Product Card Styles */

/* Product title section wrapper */
.product-title-section {
    margin-bottom: 0.8rem;
    text-align: center;
}

/* Product title with producer name */
.product-title-section .product-title {
    margin-bottom: 0.4rem;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 500;
}

.product-title-section .product-title a {
    color: #333;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.product-title-section .product-title a:hover {
    color: #0073aa;
}

/* Product details list */
.product-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.2;
}

.product-details-list span {
    display: block;
    text-align: center;
}

.product-details-list span strong {
    color: #333;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Unit size styling */
.product-unit-size {
    color: #10a085;
}

/* Unit type styling */
.product-unit-type {
    color: #0073aa;
}

/* Unit style styling */
.product-unit-style {
    color: #d63638;
}

/* Product card adjustments for better spacing */
.product-default .product-details {
    padding: 0.6rem 0.8rem 0.8rem;
}

/* Price section spacing */
.product-default .price-box {
    margin: 0.6rem 0;
}

/* Multiple prices styling */
.multiple-prices {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
}

.price-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

.price-option .price-label {
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 40px;
    text-align: right;
}

.price-option .price-value {
    font-weight: 600;
    color: #333;
}

.price-option.price-primary {
    font-size: 1rem;
}

.price-option.price-primary .price-label {
    color: #0073aa;
    font-size: 0.85rem;
}

.price-option.price-primary .price-value {
    color: #0073aa;
    font-size: 1.1rem;
}

.price-option.price-secondary {
    font-size: 0.85rem;
    opacity: 0.8;
}

.price-option.price-secondary .price-label {
    color: #999;
    font-size: 0.75rem;
}

.price-option.price-secondary .price-value {
    color: #666;
}

/* Multiple prices in list view */
.product-list .multiple-prices {
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
    justify-content: flex-start;
}

.product-list .price-option {
    flex-direction: row;
    gap: 0.3rem;
    white-space: nowrap;
}

/* Sale price styling within multiple prices */
.price-option .old-price {
    text-decoration: line-through;
    font-size: 0.9em;
    color: #999;
    margin-right: 0.3rem;
}

.price-option .sale-price {
    color: #d63638;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-title-section .product-title {
        font-size: 1.2rem;
    }
    
    .product-details-list {
        font-size: 0.8rem;
        gap: 0.15rem;
    }
    
    .product-details-list span strong {
        font-size: 0.75rem;
    }
    
    /* Multiple prices responsive */
    .multiple-prices {
        gap: 0.2rem;
    }
    
    .price-option {
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .price-option .price-label {
        font-size: 0.7rem;
        min-width: 35px;
    }
    
    .price-option.price-primary {
        font-size: 0.9rem;
    }
    
    .price-option.price-primary .price-value {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .product-title-section .product-title {
        font-size: 1.1rem;
    }
    
    .product-details-list {
        font-size: 0.75rem;
    }
    
    .product-details-list span strong {
        font-size: 0.7rem;
    }
    
    /* Multiple prices for small screens */
    .multiple-prices {
        gap: 0.15rem;
    }
    
    .price-option {
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .price-option .price-label {
        font-size: 0.65rem;
        min-width: 30px;
    }
    
    .price-option.price-primary {
        font-size: 0.85rem;
    }
    
    .price-option.price-primary .price-value {
        font-size: 0.95rem;
    }
}

/* Grid layout adjustments for better fit */
.col-6 .product-title-section .product-title,
.col-sm-4 .product-title-section .product-title,
.col-md-3 .product-title-section .product-title {
    font-size: 1.3rem;
    line-height: 1.25;
}

/* List view adjustments */
.product-list .product-title-section {
    text-align: left;
    margin-bottom: 0.6rem;
}

.product-list .product-title-section .product-title {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.product-list .product-details-list {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-list .product-details-list span {
    text-align: left;
    white-space: nowrap;
}

/* Ensure proper text wrapping for long names */
.product-title a {
    display: block;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Product card hover effects */
.product-default:hover .product-title a {
    color: #0073aa;
}

.product-default:hover .product-unit-size {
    color: #0d7566;
}

.product-default:hover .product-unit-type {
    color: #005177;
}

.product-default:hover .product-unit-style {
    color: #b32d2e;
}

/* Enhanced product action spacing */
.product-default .product-action {
    margin-top: 0.5rem;
}

/* Quantity selector and add to cart container */
.quantity-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

/* Quantity selector styling */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    min-width: 120px;
    max-width: 140px;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.qty-btn:hover {
    background: #e9ecef;
    color: #333;
}

.qty-btn:active {
    background: #dee2e6;
    transform: scale(0.95);
}

.qty-btn:disabled {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
}

.qty-input {
    border: none;
    background: transparent;
    text-align: center;
    width: 56px;
    height: 32px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    outline: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    margin: 0;
    padding: 0;
    cursor: default;
}

/* Add to cart button in quantity layout */
.quantity-add-to-cart .btn-add-cart {
    width: 100%;
    max-width: 140px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #0073aa;
    color: #fff;
}

.quantity-add-to-cart .btn-add-cart:hover {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quantity-add-to-cart .btn-add-cart:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quantity-add-to-cart .btn-add-cart.backorder-btn {
    background: #f0ad4e;
    color: #fff;
}

.quantity-add-to-cart .btn-add-cart.backorder-btn:hover {
    background: #ec971f;
}

.quantity-add-to-cart .btn-add-cart.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quantity-add-to-cart .btn-add-cart.loading-state {
    background: #6c757d;
    cursor: wait;
}

/* Wishlist and quickview buttons repositioning */
.product-action .btn-icon-wish,
.product-action .btn-quickview {
    position: static;
    display: inline-flex;
    opacity: 1;
    margin: 0.3rem 0.2rem 0;
    width: 32px;
    height: 32px;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.product-action .btn-icon-wish:hover,
.product-action .btn-quickview:hover {
    background: #e9ecef;
    color: #333;
}

/* Responsive adjustments for quantity selector */
@media (max-width: 768px) {
    .quantity-selector {
        min-width: 100px;
        max-width: 120px;
    }
    
    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .qty-input {
        width: 44px;
        height: 28px;
        font-size: 13px;
    }
    
    .quantity-add-to-cart .btn-add-cart {
        max-width: 120px;
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .quantity-selector {
        min-width: 90px;
        max-width: 100px;
    }
    
    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    
    .qty-input {
        width: 38px;
        height: 26px;
        font-size: 12px;
    }
    
    .quantity-add-to-cart .btn-add-cart {
        max-width: 100px;
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .product-action .btn-icon-wish,
    .product-action .btn-quickview {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin: 0.2rem 0.1rem 0;
    }
}

/* Category list spacing adjustment */
.product-default .category-list {
    margin-bottom: 0.3rem;
}

/* Typography improvements */
.product-title-section .product-title a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.product-details-list {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

/* Color coding for different product types */
.product-details-list[data-product-type="beer"] .product-unit-size {
    color: #b8860b;
}

.product-details-list[data-product-type="beer"] .product-unit-type {
    color: #d4a853;
}

.product-details-list[data-product-type="beer"] .product-unit-style {
    color: #8b4513;
}

.product-details-list[data-product-type="wine"] .product-unit-size {
    color: #556b2f;
}

.product-details-list[data-product-type="wine"] .product-unit-type {
    color: #722f37;
}

.product-details-list[data-product-type="wine"] .product-unit-style {
    color: #8b0000;
}

/* Loading state for product cards */
.product-card-loading .product-title-section {
    opacity: 0.6;
    pointer-events: none;
}

.product-card-loading .product-details-list {
    opacity: 0.4;
}

/* Accessibility improvements */
.product-details-list span {
    outline: none;
}

.product-title a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    .product-title-section .product-title {
        font-size: 14pt;
        color: #000;
    }
    
    .product-details-list {
        font-size: 10pt;
        color: #333;
    }
    
    .product-details-list span strong {
        font-weight: bold;
    }
} 