/* ============ Product Page Premium Styling ============ */

/* ── Skeleton Loader ─────────────────────────────────── */
@keyframes pp-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.pp-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1200px 100%;
    animation: pp-shimmer 1.4s infinite linear;
    border-radius: 4px;
}

.pp-skeleton--gallery {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
}

.pp-skeleton--breadcrumb {
    width: 240px;
    height: 14px;
    margin-bottom: 0.5rem;
}

.pp-skeleton--title {
    width: 100%;
    height: 36px;
    margin-bottom: 0.75rem;
}

.pp-skeleton--short {
    width: 50%;
}

.pp-skeleton--price {
    width: 180px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.pp-skeleton--options {
    width: 100%;
    height: 80px;
    border-radius: 4px;
}

.pp-skeleton--btn {
    width: 100%;
    height: 64px;
    border-radius: 4px;
}

.pp-skeleton--desc {
    width: 100%;
    height: 100px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .pp-skeleton--gallery {
        aspect-ratio: 1/1;
    }
}

.p-product-page.product-page {
    padding-bottom: 4rem;
    background-color: var(--white);
}

.p-product-page .product-detail-container {
    padding-top: 2rem;
}

.p-product-page .product-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .p-product-page .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Media Column (Gallery) */
.p-product-page .product-media {
    position: sticky;
    top: 100px;
    align-self: start;
    min-width: 0;
}

@media (max-width: 768px) {
    .p-product-page .product-media {
        position: relative;
        top: 0;
        margin: 0;
        width: 100%;
    }
}

/* Info Column */
.p-product-page .product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.p-product-page .breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #999;
    font-family: var(--font-secondary);
    margin-bottom: -1rem;
}

.p-product-page .breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.p-product-page .breadcrumb a:hover {
    color: var(--secondary-color);
}

.p-product-page .breadcrumb .current {
    color: var(--secondary-color);
    font-weight: 600;
}

.p-product-page .product-head {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1.5rem;
}

.p-product-page .product-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    line-height: 1.1;
    color: var(--secondary-color);
    font-weight: 400;
}

.p-product-page .product-sku {
    font-size: 0.75rem;
    color: #ccc;
    font-family: var(--font-secondary);
}

/* Pricing */
.p-product-page .product-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.p-product-page .price-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.p-product-page .old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.p-product-page .discount-badge {
    background-color: #e74c3c;
    color: var(--white);
    font-size: 0.65rem;
    font-family: var(--font-primary);
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.p-product-page .price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.p-product-page .current-price {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    font-family: var(--font-primary);
}

.p-product-page .price-label {
    font-size: 0.85rem;
    color: #27ae60;
    font-weight: 600;
    text-transform: uppercase;
}

.p-product-page .installments summary {
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: #777;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-product-page .installments summary::before {
    content: '\f0d7';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.p-product-page .installments[open] summary::before {
    transform: rotate(180deg);
}

.p-product-page .installments .items {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background-color: var(--white);
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.p-product-page .installments .item {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid #f9f9f9;
}

.p-product-page .installments .item:last-child {
    border-bottom: none;
}

.p-product-page .installments .sj {
    color: #27ae60;
    font-size: 0.75rem;
    margin-left: 4px;
}

.p-product-page .d-flex {
    display: flex;
}

.p-product-page .align-items-center {
    align-items: center;
}

/* Options Selection */
.p-product-page .product-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.p-product-page .option-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.p-product-page .option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p-product-page .option-label {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
}

.p-product-page .size-guide {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.p-product-page .size-guide:hover {
    color: var(--cta-green);
    gap: 12px;
}

.p-product-page .size-selector {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.p-product-page .size-btn {
    min-width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    background: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 2px;
}

.p-product-page .size-btn:hover:not(:disabled) {
    border-color: var(--secondary-color);
}

.p-product-page .size-btn.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.p-product-page .size-btn.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    color: #999;
}

.p-product-page .size-btn.unavailable::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #999;
    transform: rotate(-45deg);
}

.p-product-page .color-selector {
    display: flex;
    gap: 1rem;
}

.p-product-page .color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #eee;
    padding: 2px;
    background-clip: content-box;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.p-product-page .color-btn.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
}

/* Actions */
.p-product-page .product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.p-product-page .actions-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Quantity Control */
.p-product-page .qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.25s ease, opacity 0.25s ease;
    flex-shrink: 0;
    height: 64px;
}

.p-product-page .qty-control--checking {
    opacity: 0.6;
    border-color: #bbb;
}

.p-product-page .qty-btn {
    width: 40px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--secondary-color);
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.p-product-page .qty-btn:hover:not(:disabled) {
    background-color: var(--secondary-color);
    color: #fff;
}

.p-product-page .qty-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.p-product-page .qty-input {
    width: 44px;
    height: 100%;
    border: none;
    border-left: 1.5px solid #ddd;
    border-right: 1.5px solid #ddd;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--secondary-color);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}

.p-product-page .qty-input::-webkit-outer-spin-button,
.p-product-page .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quantity error */
.p-product-page .qty-error {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #c0392b;
    font-family: var(--font-secondary);
    animation: qty-error-in 0.3s ease;
    padding: 0.1rem 0;
}

.p-product-page .qty-error i {
    flex-shrink: 0;
}

@keyframes qty-error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.p-product-page .btn-add-cart {
    flex: 1;
    width: auto;
    height: 64px;
    background: linear-gradient(135deg, var(--cta-green) 0%, var(--cta-green-hover) 100%);
    color: var(--white);
    border: none;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-radius: 4px;
}

.p-product-page .btn-add-cart:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 25px rgba(21, 128, 61, 0.3);
    background: linear-gradient(135deg, var(--cta-green-light) 0%, var(--cta-green) 100%);
}

.p-product-page .btn-add-cart:active {
    transform: translateY(-2px) scale(0.98);
}

.p-product-page .btn-add-cart i {
    transition: transform 0.3s ease;
}

.p-product-page .btn-add-cart:hover i {
    transform: scale(1.2) rotate(-10deg);
}

@media (max-width: 500px) {
    .p-product-page .actions-row {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .p-product-page .qty-control {
        height: 56px;
    }
    
    .p-product-page .qty-btn {
        width: 35px;
        font-size: 1.2rem;
    }
    
    .p-product-page .qty-input {
        width: 35px;
        font-size: 1rem;
    }
    
    .p-product-page .btn-add-cart {
        height: 56px;
        font-size: 0.8rem;
        padding: 0 0.75rem;
        gap: 8px;
        letter-spacing: 0;
    }

    .p-product-page .btn-add-cart i {
        font-size: 0.8rem;
    }
}

/* Shipping */
.p-product-page .product-shipping-calc {
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.p-product-page .shipping-input {
    display: flex;
    margin-top: 1rem;
}

.p-product-page .shipping-input input {
    flex: 1;
    height: 45px;
    border: 1px solid #ddd;
    padding: 0 1rem;
    font-family: var(--font-secondary);
    outline: none;
}

.p-product-page .shipping-input button {
    height: 45px;
    padding: 0 1.5rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    font-family: var(--font-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.p-product-page .shipping-input button:hover {
    background-color: #313361;
}

.p-product-page .shipping-results {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.p-product-page .shipping-loading {
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: #999;
}

.p-product-page .shipping-loading i {
    margin-right: 8px;
}

.p-product-page .shipping-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--white);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    transition: var(--transition);
}

.p-product-page .shipping-item:hover {
    border-color: rgba(32, 33, 61, 0.2);
}

.p-product-page .shipping-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.p-product-page .shipping-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.p-product-page .shipping-time {
    font-size: 0.75rem;
    color: #888;
}

.p-product-page .shipping-price {
    font-weight: 700;
    color: var(--secondary-color);
}

.p-product-page .shipping-price.free {
    color: #27ae60;
}

/* Expandable Description */
.p-product-page .product-description-full {
    padding: 3rem 0;
    background-color: var(--white);
}

.p-product-page .description-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.p-product-page .description-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
}

.p-product-page .description-title {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    white-space: nowrap;
    margin: 0;
}

.p-product-page .description-container {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    line-height: 1.85;
    color: #555;
}

.p-product-page .description-container ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.p-product-page .description-container ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.p-product-page .description-container ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    opacity: 0.5;
}

