/* Product Detail Page Specific Styles */

/* --primary/--primary-dark/--primary-light/--secondary/--dark/--light/--border/
   --success/--warning/--danger/--gradient are already defined dynamically by
   front/store/layouts/app.blade.php (the store's actual theme color, with
   --primary-light/-dark computed as real tints/shades of it). This file used to
   redeclare them all as static fallbacks, but since this stylesheet loads via
   @stack('styles') — after that layout's own <style> block in <head> — a plain
   :root redeclaration here unconditionally won and silently overrode the real
   theme color on every page that includes this file (product detail, wishlist),
   regardless of what the store actually had configured. Removed entirely; this
   file should only *use* var(--primary) etc., never redefine them. */

/* Product Gallery */
.product-section {
    padding: 3rem 0;
}

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

.main-image {
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: #fff;
    border-radius: 15px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: #fff;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Product Info */
.product-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rating-text {
    color: var(--secondary);
}

.product-price {
    margin-bottom: 2rem;
}

.price-original {
    font-size: 1.2rem;
    color: var(--secondary);
    text-decoration: line-through;
    margin-left: 1rem;
}

.discount-badge {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 1rem;
}

/* Product Options */
.product-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-label {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.option-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
    margin-left: 1rem;
}

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

.variant-option {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variant-option:hover,
.variant-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

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

.quantity-controls {
    display: flex;
    /* border: 1px solid var(--border); */
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    border: none;
    background: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-light);
    color: white;
}

.quantity-input {
    border: none;
    padding: 0.5rem;
    width: 60px;
    text-align: center;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-add-cart {
    background: var(--gradient);
    flex: 2;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-wishlist {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    flex: 1;
    padding: 1rem;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    background: var(--primary);
    color: white !important;
}

/* Product Features */
.product-features {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Details (Side-by-Side Cards without Tabs) */
.product-details {
    margin-top: 3rem;
}

.product-detail-card {
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-detail-card:hover {
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    border-color: var(--primary-light, #cbd5e1);
}

.product-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark, #0f172a);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.product-detail-title i {
    color: var(--primary, #6366f1);
}

.product-description-content {
    color: var(--text-color, #334155);
    font-size: 0.96rem;
    line-height: 1.8;
}

.product-description-content ul,
.product-description-content ol {
    padding-left: 1.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

@media (max-width: 768px) {
    .specs-grid {
        grid-template-columns: 1fr;
    }
    .product-detail-card {
        padding: 1.25rem 1.25rem;
    }
}

.spec-item {
    display: flex;
    flex-direction: column;
    background: var(--light, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.spec-item:hover {
    background: var(--light-hover, #f1f5f9);
    border-color: var(--primary, #cbd5e1);
}

.spec-label {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary, #64748b);
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--dark, #0f172a);
    word-break: break-word;
}


/* Stock Status */
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stock-in {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stock-out {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Reviews Specific */
.review-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.review-form {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.review-form h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Star Rating Input */
.rating-input {
    margin-bottom: 1.5rem;
}

.rating-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.3s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control.textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button */
.btn-submit-review {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit-review:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Review Stats */
.review-stats {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.average-rating {
    text-align: center;
}

.average-rating .rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.average-rating .rating-stars {
    color: #fbbf24;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.rating-breakdown {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.rating-bar-stars {
    color: #fbbf24;
    min-width: 60px;
}

.rating-bar-progress {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.rating-bar-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--secondary);
}

.no-reviews {
    text-align: center;
    padding: 2rem;
    color: var(--secondary);
}

/* Related Products */
.related-products {
    margin-top: 4rem;
    padding: 3rem 0;
    background: white;
    border-radius: 15px;
}

.product-card-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #fff;
}

.product-card-body {
    padding: 1rem;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-card-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-info h1 {
        font-size: 2rem;
    }

    .main-image {
        max-height: 380px;
        height: auto;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-wishlist {
        flex: 1;
    }

    .rating-overview {
        flex-direction: column;
        text-align: center;
    }

    .average-rating {
        margin-bottom: 1rem;
    }
}

/* Stock Status Styles */
.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.stock-badge.out-of-stock {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stock-badge.low-stock {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Variant Options with Stock Status */
.variant-option {
    position: relative;
}

.variant-option[data-stock="0"] {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
    color: #6b7280;
}

.variant-option[data-stock="0"]:hover {
    border-color: var(--border);
    background-color: #f9fafb;
    color: #6b7280;
}

/* Size Options */
.size-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.size-option {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.size-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.size-option:hover::before {
    left: 100%;
}

.size-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.size-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.size-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f9fafb;
    color: #6b7280;
    transform: none;
    box-shadow: none;
}

.size-option.disabled:hover {
    border-color: var(--border);
    background-color: #f9fafb;
    color: #6b7280;
    transform: none;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.color-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.color-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: var(--shadow);
}

.color-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.color-option.disabled:hover {
    border-color: transparent;
    background: transparent;
    transform: none;
}

.color-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.color-circle.color-text {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.color-option:hover .color-circle {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(0,0,0,0.1);
}

.color-option.selected .color-circle {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary);
}

.color-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
    text-transform: capitalize;
    margin-top: 0.25rem;
}

/* Selected Variant Info */
.selected-variant-info {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--light) 0%, rgba(255,255,255,0.8) 100%);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.selected-variant-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
}

.variant-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.variant-option.selected .variant-price {
    color: var(--light);
}

.variant-price::before {
    content: '💰';
    font-size: 1rem;
}

.variant-stock {
    font-size: 0.95rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.variant-stock::before {
    content: '📦';
    font-size: 0.9rem;
}

/* Stock Information Display */
.stock-info {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Quantity Input Validation Styles */
.quantity-input:invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.store-primary-text{
    color: var(--primary);
}

.store-font-900{
    font-weight: 900;
}

.feature-icon i{
    color: #ffffff;
}
