/* =========================================
   Product Detail Page
   ========================================= */

/* Breadcrumb */
.breadcrumb {
    padding: 100px 0 16px;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--duration-fast);
}

.breadcrumb a:hover { color: var(--primary-blue); }

.breadcrumb span { color: var(--text-dark); font-weight: 600; }

.breadcrumb-sep {
    margin: 0 8px;
    color: var(--text-faint);
}

/* =========================================
   Product Detail Layout
   ========================================= */
.pd-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-bottom: 64px;
}

/* =========================================
   Product Gallery
   ========================================= */
.pd-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
}

.pd-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
}

.pd-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out-expo);
}

.pd-main-image:hover img {
    transform: scale(1.05);
}

.pd-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.pd-badge {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pd-badge-discount { background: #EF4444; color: white; }
.pd-badge-new { background: #22C55E; color: white; }
.pd-badge-rent { background: var(--primary-blue); color: white; }

.pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.pd-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all var(--duration-normal);
    background: var(--bg-light);
}

.pd-thumb:hover,
.pd-thumb.active {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   Product Info Panel
   ========================================= */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pd-brand {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
}

.pd-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.pd-meta-item i { width: 16px; height: 16px; }

.pd-stock-available {
    color: #16A34A;
    font-weight: 600;
}

.pd-stock-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16A34A;
}

.pd-rating { color: #F59E0B; }
.pd-rating i { fill: #F59E0B; color: #F59E0B; }

/* Price */
.pd-pricing {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    border: 1px solid var(--border-light);
}

.pd-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-price {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-dark);
}

.pd-original {
    font-size: var(--text-lg);
    color: var(--text-faint);
    text-decoration: line-through;
}

.pd-discount-tag {
    background: #FEE2E2;
    color: #DC2626;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 800;
}

.pd-rent-price {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--primary-blue);
    font-weight: 600;
}

.pd-rent-price i { width: 14px; height: 14px; }

/* Rent cross-sell link — gentle CTA from buy page to dedicated rent flow */
.pd-rent-link {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--primary-blue-light, rgba(0, 102, 255, 0.06));
    border: 1px solid rgba(0, 102, 255, 0.18);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s, background 0.2s;
}
.pd-rent-link:hover {
    background: rgba(0, 102, 255, 0.10);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.10);
}
.pd-rent-link-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    color: var(--primary-blue);
    flex-shrink: 0;
}
.pd-rent-link-icon i { width: 18px; height: 18px; }
.pd-rent-link-text {
    flex: 1;
    font-size: var(--text-sm);
    line-height: 1.4;
    color: var(--text-body);
}
.pd-rent-link-text strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 1px;
}
.pd-rent-link-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: var(--text-sm);
    flex-shrink: 0;
}
.pd-rent-link-cta i { width: 14px; height: 14px; }

/* Stock */
.pd-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #16A34A;
}

.pd-stock::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.pd-stock.low { color: #F59E0B; }
.pd-stock.out { color: #EF4444; }

/* Divider */
.pd-divider {
    height: 1px;
    background: var(--border-light);
    border: none;
    margin: 4px 0;
}

/* =========================================
   Product Description
   ========================================= */
.pd-desc-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-desc-title i {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.pd-desc-text {
    font-size: var(--text-sm);
    color: var(--text-body);
    line-height: 1.7;
}

.pd-desc-text p { margin-bottom: 10px; }
.pd-desc-text p:last-child { margin-bottom: 0; }

/* Specs Table */
.pd-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    margin-top: 12px;
}

.pd-specs tr { border-bottom: 1px solid var(--border-light); }
.pd-specs tr:last-child { border-bottom: none; }

.pd-specs td {
    padding: 10px 0;
    vertical-align: top;
}

.pd-specs td:first-child {
    color: var(--text-muted);
    font-weight: 600;
    width: 140px;
    padding-right: 16px;
}

.pd-specs td:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

/* =========================================
   Rent Section
   ========================================= */
.pd-rent-section {
    background: rgba(0, 102, 255, 0.04);
    border: 1.5px solid rgba(0, 102, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.pd-rent-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--primary-blue);
}

.pd-rent-header i { width: 20px; height: 20px; }

.pd-rent-options {
    display: flex;
    gap: 10px;
}

.pd-rent-opt {
    flex: 1;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    cursor: pointer;
    text-align: center;
    transition: all var(--duration-normal);
    font-family: var(--font-main);
}

.pd-rent-opt:hover {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.04);
}

.pd-rent-opt.active {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.pd-rent-opt-days {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-dark);
    display: block;
}

.pd-rent-opt-save {
    font-size: var(--text-xs);
    color: #16A34A;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

.pd-rent-opt-price {
    font-size: var(--text-sm);
    font-weight: 800;
    color: var(--primary-blue);
    margin-top: 6px;
    display: block;
}

/* =========================================
   Quantity Selector
   ========================================= */
.pd-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pd-qty-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-dark);
}

.pd-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.pd-qty-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration-fast);
    font-family: var(--font-main);
}

.pd-qty-btn:hover { background: var(--border-light); }

.pd-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pd-qty-val {
    width: 48px;
    text-align: center;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-dark);
    border: none;
    background: white;
    font-family: var(--font-main);
}

/* =========================================
   Action Buttons
   ========================================= */
.pd-actions {
    display: flex;
    gap: 10px;
}

.pd-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--duration-normal) var(--ease-out-expo);
    font-family: var(--font-main);
}

.pd-btn i { width: 18px; height: 18px; }

.pd-btn-cart {
    background: var(--primary-blue);
    color: white;
}

.pd-btn-cart:hover {
    background: var(--primary-blue-hover);
}

.pd-btn-rent {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.pd-btn-rent:hover {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.pd-btn:active { transform: scale(0.97) !important; }

.pd-btn-wishlist {
    background: white;
    color: #DC2626;
    border: 2px solid #FECACA;
    flex: 0 0 auto;
    width: 56px;
    padding: 0;
}

.pd-btn-wishlist i { width: 20px; height: 20px; transition: transform 0.2s ease; }

.pd-btn-wishlist:hover {
    background: #FEF2F2;
    border-color: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2);
}

.pd-btn-wishlist.active {
    background: #DC2626;
    color: white;
    border-color: #DC2626;
}

.pd-btn-wishlist.active i { fill: white; }

/* =========================================
   Full Description Section
   ========================================= */
.pd-full-desc {
    padding: 48px 0;
    border-top: 1px solid var(--border-light);
}

.pd-section-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.pd-desc-body {
    font-size: var(--text-base);
    color: var(--text-body);
    line-height: 1.8;
    max-width: 720px;
}

.pd-desc-body p { margin-bottom: 16px; }

.pd-desc-body h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 28px;
    margin-bottom: 12px;
}

.pd-desc-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.pd-desc-body ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.pd-desc-body ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-blue);
}

/* Specs grid for full description */
.pd-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 16px;
}

.pd-spec-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pd-spec-item:nth-child(odd) {
    border-right: 1px solid var(--border-light);
}

.pd-spec-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-spec-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-dark);
}

/* =========================================
   Recommendations Section
   ========================================= */
.pd-recommendations {
    padding: 48px 0 64px;
    border-top: 1px solid var(--border-light);
}

.pd-reco-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.pd-reco-header a {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pd-reco-header a:hover { text-decoration: underline; }
.pd-reco-header a i { width: 16px; height: 16px; }

.pd-reco-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Reuse product card styles from store */
.pd-reco-grid .product-card {
    cursor: pointer;
}

.pd-reco-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

/* =========================================
   Toast (same as store)
   ========================================= */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: var(--text-dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-xl);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: var(--text-sm);
    z-index: 400;
    transition: transform var(--duration-normal) var(--ease-out-back);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    width: 18px;
    height: 18px;
    color: #22C55E;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .pd-reco-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .breadcrumb { padding-top: 80px; }

    .pd-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pd-gallery {
        position: static;
    }

    .pd-name { font-size: 1.5rem; }
    .pd-price { font-size: var(--text-2xl); }

    .pd-rent-options {
        flex-direction: column;
    }

    .pd-reco-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-specs-grid {
        grid-template-columns: 1fr;
    }

    .pd-spec-item:nth-child(odd) {
        border-right: none;
    }
}

@media (max-width: 480px) {
    .pd-actions {
        flex-direction: column;
    }

    .pd-reco-grid {
        grid-template-columns: 1fr;
    }
}
