.pdd-container {
    max-width: 1600px;
    /* ✅ increase max width */
    margin: 20px auto;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
    align-items: start;
    box-sizing: border-box;
}

/* GALLERY */
.pdd-gallery {
    background: var(--color-white);
    padding: 18px;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 18px rgba(15, 20, 25, 0.06);

    display: flex;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
    /* ✅ full width */
    max-width: 100%;
    /* ✅ never overflow */
    box-sizing: border-box;
}


/* MAIN IMAGE WRAPPER */
.pdd-main-image {
    position: relative;
    flex: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    cursor: grab;
    touch-action: none;

    width: 100%;
    /* ✅ full width responsive */
    max-width: 100%;
    height: auto;
    /* ✅ allow auto height */
    min-height: 400px;
    /* optional safe min height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MAIN IMAGE ITSELF */
.pdd-main-image img {
    width: 100%;
    /* ✅ take full width of container */
    height: auto;
    /* ✅ keep aspect ratio */
    max-height: 80vh;
    /* ✅ fit inside viewport */
    object-fit: contain;
    object-position: center;
    display: block;
    transition: opacity .36s ease, transform .36s ease;
    transform-origin: center center;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/*
.pdd-main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: opacity .36s ease, transform .36s ease;
    transform-origin: center center;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
} */

.pdd-main-image.fade-out img {
    opacity: 0;
    transform: scale(.97);
}

/* Navigation buttons */
.pdd-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background .2s ease;
}

.pdd-nav:hover {
    background: rgba(255, 255, 255, 1);
}

.pdd-prev {
    left: 10px;
}

.pdd-next {
    right: 10px;
}

/* Thumbnails */
.pdd-thumbs {
    /* updated → vertical left column */
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    overflow-y: auto;
    max-height: 480px;
    padding-right: 4px;
    margin-top: 0;
    flex: 0 0 80px;
}

.pdd-thumb {
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

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

.pdd-thumb.active {
    border-color: var(--color-highlight);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Color swatches */
.pdd-swatches {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.pdd-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform .2s ease;
}

.pdd-swatch:active {
    transform: scale(.9);
}

.pdd-swatch.selected {
    outline: 2px solid var(--color-highlight);
    transform: translateY(-3px);
}

/* RIGHT PANEL */
.pdd-details {
    background: var(--color-white);
    padding: 22px;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 18px rgba(15, 20, 25, 0.06);
}

.pdd-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pdd-sku {
    font-size: 13px;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.pdd-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-highlight);
    margin: 10px 0 18px;
}

.pdd-meta-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--color-secondary);
}

.pdd-meta {
    background: var(--color-accent);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    min-width: 110px;
}

.pdd-zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pdd-main-image .pdd-zoom-btn {
    display: flex;
}

.pdd-zoom-btn+.pdd-zoom-btn {
    top: 50px;
    /* place the second button below the first */
}

.pdd-short-desc {
    font-size: 14px;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.pdd-qty-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.pdd-qty-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.pdd-qty-box button {
    border: none;
    background: #f1f1f1;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
}

.pdd-qty-box input {
    width: 50px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
    font-size: 16px;
}

.total-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-highlight);
}

.exc-vat {
    font-size: 13px;
    color: var(--color-secondary);
    margin-left: 4px;
}

.pdd-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pdd-heart {
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdd-size-selection {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 18px;
    margin-bottom: 20px;
    background: #fafafa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pdd-size-selection h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* SINGLE SIZE */
.size-single {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.size-single-item {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 14px;
    cursor: pointer;
}

.size-single-item:hover {
    border-color: var(--color-highlight);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.size-single-item.selected {
    background: var(--color-accent);
    border-color: var(--color-highlight);
    color: #222;
}

/* MULTIPLE SIZE */
.size-multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.multi-size-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    background: #fff;
}

.multi-size-item input {
    width: 50px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 4px;
}

.size-note {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.size-type-btn {
    padding: 6px 12px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: all .2s ease;
}

.size-type-btn.selected {
    background: var(--color-accent);
    border-color: var(--color-highlight);
    color: #222;
}

.delivery-msg {
    background-color: #d4edda;
    /* light green */
    color: #155724;
    /* dark green text */
    border-left: 4px solid #28a745;
    /* highlighted border */
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}

.pdd-qty-box input[disabled],
.pdd-qty-box button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* RESPONSIVE FIXES */
@media (max-width: 1024px) {
    .pdd-container {
        grid-template-columns: 1fr;
        /* stack details under gallery */
    }

    .pdd-gallery {
        flex-direction: column;
        /* thumbs go below main image */
    }

    .pdd-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        width: 100%;
    }

    .pdd-thumb {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 600px) {
    .pdd-main-image {
        min-height: 300px;
    }

    .pdd-main-image img {
        max-height: 60vh;
    }
}
