
/* PAGE */
.product-page {
    min-height: calc(100vh - 80px);
    padding: 40px 20px 80px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.product-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* BREADCRUMB */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: #94a3b8;
    font-size: 12px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #64748b;
    transition: .2s;
}

.breadcrumb a:hover {
    color: #4f46e5;
}

/* PRODUCT */
.product-details {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 60px;
    align-items: start;
}

/* GALLERY */
.product-gallery {
    position: sticky;
    top: 105px;
}

.main-image {
    position: relative;
    width: 100%;
    height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border: 1px solid #eef2f7;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
    background: rgba(255, 255, 255, .65);
    font-size: 110px;
}

.discount-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 7px 12px;
    border-radius: 9px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
}

/* PRODUCT INFO */
.product-info {
    padding-top: 8px;
}

.product-category {
    display: inline-block;
    margin-bottom: 12px;
    color: #6366f1;
    font-size: 12px;
    font-weight: 700;
}

.product-title {
    margin: 0 0 20px;
    color: #111827;
    font-size: 36px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -.6px;
}

/* PRICE */
.price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.current-price {
    color: #111827;
    font-size: 30px;
    font-weight: 800;
}

.current-price span {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
}

.old-price {
    color: #94a3b8;
    font-size: 14px;
    text-decoration: line-through;
}

/* DESCRIPTION */
.description {
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
    line-height: 2;
    white-space: pre-line;
}

/* STOCK */
.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.stock-dot.available {
    background: #22c55e;
}

.stock-dot.unavailable {
    background: #ef4444;
}

/* STORE ALERT */
.store-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 11px;
    background: #fffbeb;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
}

.store-alert-icon {
    flex-shrink: 0;
}

/* ACTIONS */
.product-actions {
    display: grid;
    grid-template-columns: 52px 125px minmax(0, 1fr);
    gap: 10px;
    margin-top: 25px;
}

.favorite-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: white;
    color: #64748b;
    font-size: 25px;
    transition: .2s;
}

.favorite-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.favorite-btn.active {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.favorite-btn:disabled {
    cursor: wait;
    opacity: .6;
}

/* QUANTITY */
.quantity-control {
    height: 52px;
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: white;
    overflow: hidden;
}

.quantity-btn {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #374151;
    font-size: 20px;
    transition: .2s;
}

.quantity-btn:hover:not(:disabled) {
    background: #f3f4f6;
}

.quantity-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

#quantityInput {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    appearance: textfield;
}

#quantityInput::-webkit-inner-spin-button,
#quantityInput::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

/* ADD TO CART */
.add-to-cart {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    background: #111827;
    color: white;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}

.add-to-cart:hover:not(:disabled) {
    background: #1f2937;
    transform: translateY(-1px);
}

.add-to-cart:disabled {
    background: #cbd5e1;
    color: #f8fafc;
    cursor: not-allowed;
    transform: none;
}

/* META */
.product-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.meta-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.meta-value {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

/* RELATED PRODUCTS */
.related-section {
    margin-top: 90px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.section-kicker {
    display: block;
    margin-bottom: 5px;
    color: #6366f1;
    font-size: 11px;
    font-weight: 700;
}

.section-header h2 {
    margin: 0;
    color: #111827;
    font-size: 25px;
    font-weight: 800;
}

.view-all {
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.related-card {
    overflow: hidden;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .035);
    transition: .25s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, .08);
}

.related-image {
    position: relative;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .25s;
}

.related-card:hover .related-image img {
    transform: scale(1.04);
}

.related-placeholder {
    font-size: 65px;
}

.related-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 7px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
}

.related-content {
    padding: 14px;
}

.related-category {
    display: block;
    margin-bottom: 6px;
    color: #6366f1;
    font-size: 9px;
    font-weight: 700;
}

.related-title {
    display: block;
    margin-bottom: 12px;
    overflow: hidden;
    color: #1e293b;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.related-title:hover {
    color: #4f46e5;
}

.related-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.related-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.related-price strong {
    color: #111827;
    font-size: 12px;
    white-space: nowrap;
}

.related-price del {
    color: #94a3b8;
    font-size: 9px;
    white-space: nowrap;
}

.related-cart {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 14px;
    transition: .2s;
}

.related-cart:hover:not(:disabled) {
    background: #6366f1;
    color: white;
}

.related-cart:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    opacity: .7;
}

/* RESPONSIVE */
@media (max-width: 950px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 480px;
    }

    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .product-page {
        padding: 30px 14px 60px;
    }

    .product-details {
        gap: 30px;
    }

    .main-image {
        height: 400px;
        border-radius: 18px;
    }

    .product-title {
        font-size: 28px;
    }

    .current-price {
        font-size: 25px;
    }

    .product-actions {
        grid-template-columns: 48px 115px minmax(0, 1fr);
        gap: 8px;
    }

    .favorite-btn {
        width: 48px;
        height: 48px;
    }

    .quantity-control,
    .add-to-cart {
        height: 48px;
    }

    .add-to-cart {
        font-size: 12px;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .main-image {
        height: 330px;
    }

    .product-placeholder {
        width: 170px;
        height: 170px;
        border-radius: 30px;
        font-size: 80px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-actions {
        grid-template-columns: 46px 105px minmax(0, 1fr);
    }

    .product-meta {
        grid-template-columns: 1fr;
    }

    .related-section {
        margin-top: 60px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-image {
        height: 220px;
    }
}