/* Product Detail Page Styles */
:root {
    --primary-orange: #ff6b35;
    --secondary-orange: #f7931e;
    --white: #ffffff;
    --black: #000000;
    --gray-text: #666666;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --border-light: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Enhanced Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.quantity-btn {
    border: none !important;
    border-radius: 0 !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: var(--transition);
}

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

.quantity-input {
    border: none !important;
    border-left: 1px solid var(--border-light) !important;
    border-right: 1px solid var(--border-light) !important;
    border-radius: 0 !important;
    width: 80px;
    height: 40px;
    font-weight: bold;
}

.quantity-input:focus {
    box-shadow: none !important;
    border-color: var(--primary-orange) !important;
}

/* Product Purchase Section */
.product-purchase-section {
    background: linear-gradient(135deg, #fff9f5, #ffeee5) !important;
    border: 2px solid rgba(255, 107, 53, 0.1) !important;
    position: relative;
    overflow: hidden;
}

.product-purchase-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
}

.add-to-cart-btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.add-to-cart-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

/* Total Price Animation */
#total-price {
    transition: var(--transition);
}

.price-updated {
    animation: priceUpdate 0.5s ease;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--secondary-orange); }
    100% { transform: scale(1); }
}

/* Sticky Add to Cart Bar */
.sticky-add-to-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--primary-orange);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 15px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sticky-add-to-cart.show {
    transform: translateY(0);
}

.product-mini-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.sticky-product-placeholder {
    width: 50px;
    height: 50px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-text);
    border: 1px solid var(--border-light);
}

.sticky-product-details {
    flex: 1;
    min-width: 0;
}

.sticky-product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-gray);
    line-height: 1.2;
    margin-bottom: 2px;
}

.sticky-product-price {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-orange);
}

/* Mini Quantity Selector for Sticky Bar */
.quantity-selector-mini {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
}

.quantity-btn-mini {
    border: none !important;
    border-radius: 0 !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0;
}

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

.quantity-input-mini {
    border: none !important;
    border-left: 1px solid var(--border-light) !important;
    border-right: 1px solid var(--border-light) !important;
    border-radius: 0 !important;
    width: 50px;
    height: 32px;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0;
}

.quantity-input-mini:focus {
    box-shadow: none !important;
    border-color: var(--primary-orange) !important;
}

/* Loading States */
.add-to-cart-btn.loading {
    pointer-events: none;
}

.add-to-cart-btn.loading i {
    animation: spin 1s linear infinite;
}

.sticky-cart-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Animation */
.cart-success {
    animation: cartSuccess 0.6s ease;
}

@keyframes cartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #28a745; }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-mini-info {
        gap: 8px;
    }
    
    .sticky-product-image,
    .sticky-product-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .sticky-product-name {
        font-size: 0.8rem;
    }
    
    .sticky-product-price {
        font-size: 0.85rem;
    }
    
    .quantity-selector-mini {
        border-radius: 4px;
    }
    
    .quantity-btn-mini {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .quantity-input-mini {
        width: 45px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .sticky-add-to-cart {
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .product-purchase-section {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0 !important;
    }
    
    .sticky-add-to-cart .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .sticky-add-to-cart {
        border-top: 3px solid var(--primary-orange);
    }
    
    .quantity-selector,
    .quantity-selector-mini {
        border: 2px solid var(--primary-orange);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .sticky-add-to-cart,
    .add-to-cart-btn,
    .quantity-btn,
    .quantity-btn-mini,
    #total-price {
        transition: none;
        animation: none;
    }
}

/* Product Image Zoom Effect */
.product-image {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

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

/* Breadcrumb Enhancement */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--primary-orange);
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--primary-orange);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Badge Enhancements */
.badge.bg-orange {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange)) !important;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Product Info Section */
.product-info {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-orange);
}

.product-info h6 {
    color: var(--primary-orange);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-info li {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.product-info li:last-child {
    border-bottom: none;
}