/* === Page Container === */

.product-detail-page {
    padding: 1.5rem 0 3rem;
    min-height: 60vh;
}

.product-detail-page .product-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.product-detail-page .product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.product-detail-page .product-image-wrapper .product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
}

.product-detail-page .product-image-wrapper .product-image-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.product-detail-page .product-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}


/* === Favorite Button === */

.product-detail-page .product-favorite-btn:not(.product-hero-action) {
    width: 32px;
    height: 32px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease-out, background-color 0.15s ease-out, color 0.15s ease-out, transform 0.15s ease-out;
    flex-shrink: 0;
    color: #9ca3af;
}

.product-detail-page .product-favorite-btn:not(.product-hero-action):hover {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #f87171;
    transform: translateY(-1px);
}

.product-detail-page .product-favorite-btn:not(.product-hero-action).active {
    border-color: #ef4444;
    background: #ef4444;
    color: #ffffff;
}

.product-detail-page .product-favorite-btn:not(.product-hero-action).active:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.product-detail-page .product-favorite-btn:not(.product-hero-action) i {
    font-size: 0.85rem;
    transition: transform 0.12s ease-out;
}

.product-detail-page .product-favorite-btn:not(.product-hero-action):hover i {
    transform: scale(1.05);
}


/* === Rating Section === */

.product-detail-page .product-rating-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.product-detail-page .product-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.product-detail-page .product-rating-stars i {
    font-size: 1rem;
    color: #fbbf24;
}

.product-detail-page .product-rating-stars i.fa-regular {
    color: #d1d5db;
}

.product-detail-page .product-rating-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.product-detail-page .product-rating-count {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.12s ease-out;
}

.product-detail-page .product-rating-count:hover {
    color: var(--primary);
    text-decoration: underline;
}

.product-detail-page .product-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

.product-detail-page .product-meta-item i {
    font-size: 0.8rem;
}

.product-detail-page .product-meta-item .meta-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.product-detail-page .product-meta-item.delivery-type.instant {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.product-detail-page .product-meta-item.delivery-type.order {
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.product-detail-page .product-meta-item.sold-count {
    color: #edf3f6;
    background: rgba(249, 115, 22, 0.1);
}

.product-detail-page .product-meta-item.sold-count i {
    color: #ef4444;
}


/* === Content Section (Plans + Order Form) === */

.product-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
}


/* Desktop: Grid layout for 2 columns */

@media (min-width: 993px) {
    .product-detail-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        grid-template-rows: auto auto auto;
        align-items: flex-start;
        gap: 1.5rem;
    }


/* Plans section - column 1, row 1 */

    .product-plans-section {
        grid-column: 1;
        grid-row: 1;
    }


/* Content tabs section - column 1, row 2 */

    .product-content-tabs {
        grid-column: 1;
        grid-row: 2;
    }


/* Reviews section - column 1, row 3 */

    .product-reviews-section {
        grid-column: 1;
        grid-row: 3;
    }


/* Order section - column 2, spans all rows */

    .product-order-section {
        grid-column: 2;
        grid-row: 1 / 4;
    }


/* Single package: the plans block is hidden, so collapse the empty first row —
   pull tabs/reviews up and let the order card span the remaining rows. */

    .product-detail-content.no-plan-selector {
        grid-template-rows: auto auto;
    }

    .product-detail-content.no-plan-selector .product-content-tabs {
        grid-row: 1;
    }

    .product-detail-content.no-plan-selector .product-reviews-section {
        grid-row: 2;
    }

    .product-detail-content.no-plan-selector .product-order-section {
        grid-row: 1 / 3;
    }
}
