/**
 * Product Page Styles
 * Full-width modern design
 */

/* ========================================
   PRODUCT PAGE BASE
   ======================================== */

.product-page {
    background: var(--bg-dark);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ========================================
   PRODUCT HERO (Full-width header image)
   ======================================== */



/* ========================================
   PRODUCT DETAILS SECTION
   ======================================== */

.product-details {
    position: relative;
    padding-top: 120px;
    z-index: 2;
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   PRODUCT IMAGE SECTION
   ======================================== */

.product-image-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.product-main-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background: linear-gradient(145deg, #1a1a24, #12121a);
}

.product-discount-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.product-featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

@media (max-width: 992px) {
    .product-image-section {
        position: relative;
        top: 0;
    }
    
    .product-main-image {
        aspect-ratio: 16 / 10;
    }
}

/* ========================================
   PRODUCT INFO SECTION
   ======================================== */

.product-info-section {
    padding: 20px 0;
}

.product-category {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,140,0,0.08));
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.product-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.product-meta__item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.product-meta__item i {
    color: var(--primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Price Box */
.product-price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    padding: 28px 32px;
    background: linear-gradient(145deg, rgba(26,26,40,0.9), rgba(18,18,28,0.95));
    border-radius: 20px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.product-price-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,107,0,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-price-box:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.product-price-box:hover::before {
    opacity: 1;
}

.product-price-box__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.product-price-box__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.product-price-box__icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.product-price-box:hover .product-price-box__icon {
    transform: scale(1.1) rotate(5deg);
}

.product-price {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.product-price-old {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ========================================
   PRODUCT ADDONS
   ======================================== */

.product-addons {
    margin-bottom: 30px;
}

.product-addons__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-addons__title i {
    color: var(--primary);
}

.addon-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.addon-category.shake {
    animation: shake 0.5s ease-in-out;
    border-color: var(--danger) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.addon-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.addon-category__name {
    font-weight: 600;
    color: var(--text-primary);
}

.addon-category__badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.addon-category__badge--required {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.addon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: 16px;
}

.addon-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    overflow: hidden;
}

.addon-item:hover {
    border-color: rgba(255, 107, 53, 0.5);
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
}

.addon-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 107, 53, 0.05));
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.addon-item__check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.addon-item__check i {
    font-size: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.addon-item.selected .addon-item__check {
    background: var(--primary);
    border-color: var(--primary);
}

.addon-item.selected .addon-item__check i {
    opacity: 1;
}

.addon-item__image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a24, #12121a);
}

.addon-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.addon-item__weight {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 107, 53, 0.9);
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 2;
}

.addon-item--no-image .addon-item__weight {
    position: static;
    margin-left: auto;
    margin-right: 12px;
}

.addon-item:hover .addon-item__image img {
    transform: scale(1.05);
}

.addon-item__name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s;
    padding: 12px;
    text-align: center;
    font-weight: 500;
}

.addon-item.selected .addon-item__name {
    color: var(--text-primary);
    font-weight: 600;
}

.addon-item__price {
    display: none;
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

/* ========================================
   ADDON ITEM WITHOUT IMAGE
   ======================================== */
.addon-item--no-image {
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
}

.addon-item--no-image .addon-item__check {
    position: relative;
    top: auto;
    right: auto;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-right: 12px;
}

.addon-item--no-image .addon-item__name {
    padding: 0;
    text-align: left;
    flex: 1;
}

/* ========================================
   PRODUCT NOTE
   ======================================== */ */

.product-note {
    margin-bottom: 30px;
}

.product-note label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.product-note label i {
    color: var(--primary);
    margin-right: 8px;
}

.product-note textarea {
    width: 100%;
    min-height: 80px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.product-note textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.product-note textarea::placeholder {
    color: var(--text-muted);
}

/* ========================================
   PRODUCT ACTIONS
   ======================================== */

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-actions__row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.product-actions__secondary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .product-actions__row {
        flex-direction: column;
    }
    
    .product-actions__secondary {
        flex-direction: column;
    }
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.quantity-btn {
    width: 50px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
}

.quantity-input {
    width: 70px;
    height: 56px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.quantity-input:focus {
    outline: none;
}

/* Add to Cart Button */
.add-to-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* In Cart State */
.add-to-cart-btn.in-cart {
    background: linear-gradient(135deg, var(--success), #16a34a);
    pointer-events: none;
}

.add-to-cart-btn.in-cart:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

/* Add Another Button */
.add-another-btn {
    display: none;
    flex: 1;
    min-height: 50px;
    font-size: 0.95rem;
    font-weight: 600;
}

.add-another-btn.visible {
    display: flex;
}

/* Back to Menu Button */
.back-to-menu-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 768px) {
    .add-to-cart-btn,
    .add-another-btn,
    .back-to-menu-btn {
        width: 100%;
        flex: none;
    }
}

/* ========================================
   RELATED PRODUCTS
   ======================================== */

.related-products {
    padding: 80px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.related-products .section-title {
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.related-grid .product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--gradient-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 53, 0.4);
}

.related-grid .product-card__link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-grid .product-card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-secondary);
}

.related-grid .product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-grid .product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.related-grid .product-card__body {
    padding: 16px;
    flex: 1;
}

.related-grid .product-card__category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.related-grid .product-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.related-grid .product-card__footer {
    margin-top: auto;
}

.related-grid .product-card__price {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Quick Add Button */
.product-card__quick-add {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-card__quick-add:hover {
    background: linear-gradient(135deg, #ff8c00, var(--primary));
    box-shadow: inset 0 -3px 10px rgba(0, 0, 0, 0.2);
}

.product-card__quick-add:active {
    transform: scale(0.98);
}

@media (max-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Addon grid responsiveness - 1 column mobile, up to 8-10 on desktop */
@media (max-width: 480px) {
    .addon-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .addon-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .addon-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .addon-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .addon-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1281px) and (max-width: 1536px) {
    .addon-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1537px) and (max-width: 1920px) {
    .addon-list {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 1921px) {
    .addon-list {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (max-width: 768px) {
    .product-details {
        padding-top: 100px;
    }
    
    .product-price-box {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .product-price {
        font-size: 2rem;
    }
    
    .addon-item__name {
        font-size: 0.8rem;
        padding: 10px 8px;
    }
    
    .addon-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .addon-category {
        padding: 18px;
    }
    
    .addon-category__name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .addon-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .addon-item__image {
        aspect-ratio: 1;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.75rem;
    }
    
    .product-main-image {
        border-radius: 16px;
    }
    
    .product-grid {
        gap: 30px;
    }
    
    .addon-category {
        padding: 14px;
        border-radius: 14px;
    }
    
    .addon-category__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .addon-category__name {
        font-size: 0.9rem;
    }
    
    .addon-category__badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .addon-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .addon-item {
        border-radius: 12px;
    }
    
    .addon-item:hover {
        transform: none;
    }
    
    .addon-item__check {
        width: 22px;
        height: 22px;
        top: 6px;
        right: 6px;
    }
    
    .addon-item__check i {
        font-size: 10px;
    }
    
    .addon-item__name {
        font-size: 0.7rem;
        padding: 8px 6px;
    }
    
    .addon-item--no-image {
        padding: 10px 12px;
    }
    
    .addon-item--no-image .addon-item__check {
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin-right: 8px;
    }
    
    .addon-item--no-image .addon-item__name {
        font-size: 0.8rem;
    }
    
    /* Product note */
    .product-note textarea {
        min-height: 60px;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Quantity selector */
    .quantity-selector {
        border-radius: 10px;
    }
    
    .quantity-btn {
        width: 44px;
        height: 48px;
    }
    
    .quantity-input {
        width: 55px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    /* Add to cart */
    .add-to-cart-btn {
        min-height: 50px;
        font-size: 0.95rem;
    }
}

/* ========================================
   PRODUCT MAIN IMAGE - NO IMAGE VARIANT
   ======================================== */
.product-main-image--no-image {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 193, 7, 0.06));
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image__text {
    text-align: center;
    padding: 40px;
}

.product-main-image__text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.product-main-image__weight {
    display: inline-block;
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 50px;
}
