/* ========================================
   Product Detail Page - Modern & Clean
   ======================================== */

/* Container */
.pdp-wrapper  {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pdp {
    gap: var(--spacing-xl);
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

/* ===== Gallery ===== */
.pdp-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.pdp-image {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.pdp-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--spacing-lg);
}

/* ===== Content ===== */
.pdp-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Top - Title + Favorite */
.pdp-top {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.pdp-title {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    margin: 0;
}

.pdp-fav {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--color-text-muted);
}

.pdp-fav svg {
    width: 22px;
    height: 22px;
}

.pdp-fav:hover {
    background: #ffe5e5;
    color: #ef4444;
}

.pdp-fav.active {
    background: #ef4444;
    color: white;
}

.pdp-fav.active svg {
    fill: currentColor;
}

/* Rating */
.pdp-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.pdp-stars {
    display: flex;
    gap: 2px;
}

.pdp-star {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 1.5;
}

.pdp-star.filled {
    fill: #fbbf24;
    stroke: #fbbf24;
}

.pdp-rating-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Article */
.pdp-article {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.pdp-article span {
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Attributes */
.pdp-attributes {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.pdp-attributes-row {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: 2px;
}

.pdp-attributes-row::-webkit-scrollbar {
    height: 4px;
}

.pdp-attributes-row::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: 999px;
}

.pdp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pdp-chip--selected {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #c8e6c9;
}

.pdp-chip--color {
    padding: 4px;
    width: 36px;
    height: 36px;
    justify-content: center;
}

.pdp-chip--color.pdp-chip--selected {
    border-color: var(--color-primary);
    background: transparent;
}

.pdp-chip-color {
    width: 24px;
    height: 24px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
}

.pdp-chip-check {
    font-size: 0.75rem;
    color: #2e7d32;
}

/* Price Block - Mobile: inline layout */
.pdp-price-block {
    background: transparent;
    border-radius: 16px;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: none;
}

.pdp-price-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.pdp-weight {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.pdp-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1;
}

.pdp-old-price {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.pdp-badge {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Cart Actions - inline */
.pdp-cart {
    flex: 1;
    display: flex;
    gap: var(--spacing-sm);
}

.pdp-add-btn {
    flex: 1;
    height: 40px;
    min-height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, var(--color-primary)) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.25);
}

.pdp-add-btn svg {
    width: 20px;
    height: 20px;
}

.pdp-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.35);
}

.pdp-add-btn:active {
    transform: translateY(0);
}

/* Quantity Controls - compact */
.pdp-qty {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: 14px;
    padding: 4px;
    height: 40px;
    min-height: 40px;
}

.pdp-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.pdp-qty-btn svg {
    width: 16px;
    height: 16px;
}

.pdp-qty-btn:hover {
    background: var(--color-primary);
    color: white;
}

.pdp-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdp-qty-value {
    flex: 1;
    text-align: center;
    padding: 0 var(--spacing-xs);
}

/* Quantity Input */
.pdp-qty-input {
    width: 100%;
    height: 24px;
    border: none;
    background: transparent;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    display: block;
}

.pdp-qty-input::-webkit-outer-spin-button,
.pdp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pdp-qty-input:focus {
    outline: none;
    background: rgba(var(--color-primary-rgb), 0.1);
    border-radius: var(--border-radius-sm);
}

.pdp-qty-sum {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    font-weight: 500;
}

/* Shop */
.pdp-shop {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-bg-secondary);
    border-radius: 12px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    width: fit-content;
}

.pdp-shop svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* ===== Tabs ===== */
.pdp-tabs {
    margin-top: var(--spacing-sm);
}

.pdp-tabs-component .ui-tabs-list {
    padding: 0;
    gap: var(--spacing-xl);
    border-bottom: 2px solid var(--color-border-light);
}



/* Tab Content */
.pdp-tabs-component .ui-tab-panel {
    max-height: 50vh;
    overflow-y: auto;
}

.pdp-tab-text {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
    display: flex;
    flex-direction: column;
}

.pdp-tab-text p {
    margin-block-start: var(--spacing-sm);
    margin-block-end: var(--spacing-sm);
}

.pdp-tab-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--spacing-xl);
    font-size: 0.9375rem;
}

/* Specs */
.pdp-specs {
    display: flex;
    flex-direction: column;
}

.pdp-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.pdp-spec:last-child {
    border-bottom: none;
}

.pdp-spec-name {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.pdp-spec-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
}

/* ========================================
   Desktop Layout
   ======================================== */
@media (min-width: 768px) {
    .pdp {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }
    
    .pdp-gallery {
        position: sticky;
        top: var(--spacing-2xl);
    }
    
    .pdp-image {
        border-radius: 32px;
    }
    
    .pdp-title {
        font-size: 1.75rem;
    }
    
    /* Price block - desktop: premium glassmorphism card */
    .pdp-price-block {
        background: linear-gradient(145deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(248, 250, 255, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 24px;
        padding: var(--spacing-xl);
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-lg);
        border: 1px solid rgba(255, 255, 255, 0.8);
        box-shadow: 
            0 8px 32px rgba(var(--color-primary-rgb), 0.08),
            0 4px 16px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            inset 0 -1px 0 rgba(0, 0, 0, 0.02);
        position: relative;
        overflow: hidden;
    }
    
    /* Subtle shine effect on price block */
    .pdp-price-block::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(255, 255, 255, 0.8) 20%,
            rgba(255, 255, 255, 1) 50%,
            rgba(255, 255, 255, 0.8) 80%,
            transparent 100%);
    }
    
    .pdp-price-row {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-md);
        flex-wrap: wrap;
    }
    
    .pdp-price {
        font-size: 2.5rem;
        background: linear-gradient(135deg, var(--color-text) 0%, #374151 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .pdp-old-price {
        font-size: 1.125rem;
        opacity: 0.7;
    }
    
    .pdp-badge {
        position: static;
        font-size: 0.9375rem;
        font-weight: 600;
        padding: 8px 14px;
        border-radius: 18px;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }
    
    .pdp-cart {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .pdp-add-btn {
        height: 48px;
        min-height: 48px;
        font-size: 1rem;
        border-radius: 14px;
        background: linear-gradient(135deg, 
            var(--color-primary) 0%, 
            var(--color-primary-hover) 100%);
        box-shadow: 
            0 4px 16px rgba(var(--color-primary-rgb), 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .pdp-add-btn:hover {
        transform: translateY(-2px);
        box-shadow: 
            0 8px 24px rgba(var(--color-primary-rgb), 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    
    .pdp-qty {
        height: 48px !important;
        min-height: 48px !important;
        padding: 6px;
        border-radius: 14px;
        background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
        box-shadow: 
            inset 0 1px 2px rgba(0, 0, 0, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .pdp-qty-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: white;
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 1);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .pdp-qty-btn:hover {
        background: var(--color-primary);
        color: white;
        transform: scale(1.05);
        box-shadow: 
            0 4px 12px rgba(var(--color-primary-rgb), 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    
    .pdp-qty-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .pdp-qty-input {
        font-size: 1.25rem;
        height: 28px;
    }
    
    .pdp-qty-sum {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    
    .pdp-title {
        font-size: 2rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.pdp {
    animation: fadeIn 0.4s ease-out;
}
