/* ==========================================================================
   Khyati Atelier Premium Product Page Styles
   ========================================================================== */

.kh-pdp-wrapper {
    background-color: #FAF6EF;
    color: #2C1A14;
    font-family: 'Inter', sans-serif;
    padding-top: 10px;
    padding-bottom: 60px;
    position: relative;
    width: 100%;
    margin-top: 0;
    overflow-x: hidden;
}

/* Override theme's default bottom padding on the product page */
.single-product #site-content {
    padding-bottom: 0 !important;
}

/* Breadcrumb */
.kh-breadcrumb-bar {
    background-color: #3D0A13;
    padding: 12px 0;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C9A24A;
}
.kh-breadcrumb-bar a {
    color: #FAF6EF;
    text-decoration: none;
    margin: 0 5px;
}

/* Layout Grid */
.kh-pdp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Left Column: Gallery */
.kh-pdp-gallery-sticky {
    position: sticky;
    top: 75px; /* Clears the 65px custom header + 10px breathing room */
}
.kh-gallery-grid {
    display: flex;
    gap: 20px;
}
.kh-thumbnails {
    width: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.kh-thumb {
    width: 100%;
    /* Removed aspect-ratio to prevent height cropping */
    background: #fff;
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
}
.kh-thumb.active {
    border-color: #C9A24A;
}
.kh-thumb img {
    width: 100%;
    height: auto;
    /* Removed object-fit: cover to prevent zooming/cropping */
    display: block;
    object-fit: contain !important;
}
.kh-video-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: 1px solid #D6C5A8;
    padding: 15px 5px;
    cursor: pointer;
    font-size: 9px;
    letter-spacing: 0.05em;
    color: #2C1A14;
    margin-top: 10px;
}
.kh-video-toggle svg {
    width: 16px;
    height: 16px;
}
.kh-main-image {
    flex: 1;
    position: relative;
    background: #fff;
    overflow: visible;
}
.kh-main-image img {
    width: 100%;
    height: auto;
    display: block;
    /* No object-fit - let image render at natural proportions */
    transition: opacity 0.3s ease;
}
.kh-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.92);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2C1A14 !important;
    transition: all 0.3s;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0;
    margin: 0;
    line-height: 1;
}
.kh-gallery-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.kh-gallery-nav svg {
    width: 20px;
    height: 20px;
    stroke: #2C1A14 !important;
    fill: none !important;
    display: block;
}
.kh-gallery-prev {
    left: 12px;
}
.kh-gallery-next {
    right: 12px;
}
.kh-gallery-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    font-size: 11px;
    letter-spacing: 0.1em;
}
.kh-gallery-actions button {
    background: none;
    border: none;
    color: #2C1A14;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Right Column: Info */
.kh-info-header {
    margin-bottom: 30px;
}
.kh-arrival-tag {
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #C9A24A;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}
.kh-product-title {
    font-family: 'Bodoni Moda', serif !important;
    font-weight: 500;
    font-size: 54px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #4A1F24;
    margin: 0 0 10px 0;
}
.kh-product-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2C1A14;
    font-style: normal;
    margin-bottom: 20px;
}
.kh-product-price {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 26px;
    letter-spacing: 0.01em;
    color: #7B7B7B;
    margin-bottom: 20px;
}
.kh-product-price del {
    text-decoration: line-through !important;
    opacity: 0.6;
    font-weight: 400;
    margin-right: 8px;
}
.kh-product-price ins {
    text-decoration: none !important;
    font-weight: 600;
    color: #4B0F1F;
}
.kh-product-desc, .kh-product-desc * {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 400 !important;
    font-size: 13px;
    color: #6B5B4A;
    line-height: 1.6;
}

/* Trust Badges */
.kh-trust-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 35px;
    padding: 20px 0;
    border-top: 1px solid #E8DFD0;
    border-bottom: 1px solid #E8DFD0;
}
.kh-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.kh-badge svg {
    flex-shrink: 0;
}
.kh-badge-text {
    display: flex;
    flex-direction: column;
}
.kh-badge-text strong {
    font-size: 10px;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #2C1A14;
    font-family: 'Inter', sans-serif;
}
.kh-badge-text small {
    font-size: 11px;
    color: #6B5B4A;
    font-family: 'Playfair Display', serif;
    margin-top: 2px;
}

/* Step Sections */
.kh-step-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #E8DFD0;
}
.kh-step-section:last-of-type {
    border-bottom: none;
}

/* ── PERSONALIZE YOUR LOOK — Simple Header ── */
.kh-step-personalize-simple {
    padding: 15px 0 !important;
}
.kh-step-personalize-simple .kh-step-header {
    margin-bottom: 0;
}
.kh-step-personalize-simple .kh-step-num {
    background: #FAF6EF;
    color: #8E6F2E;
    border: 1px solid #EADDCD;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 13px;
}
.kh-step-personalize-simple .kh-step-title {
    font-size: 15px;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.kh-step-personalize-simple .kh-link-right {
    color: #8E6F2E;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    font-weight: 600;
    gap: 10px;
    background: #FAF6EF;
    border: 1px solid #EADDCD;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.kh-step-personalize-simple .kh-link-right:hover {
    background: #F2E8D5;
    border-color: #D4C4A8;
}
.kh-step-personalize-simple .kh-link-right svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}



.kh-step-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    width: 100%;
}
.kh-step-num {
    width: 28px;
    height: 28px;
    background: #F8F2E8;
    color: #C9A24A;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 15px;
    padding: 0;
    border: 1px solid #E8DFD0;
}
.kh-step-title {
    font-size: 14px;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin: 0;
    color: #2C1A14;
    white-space: nowrap;
}
.kh-customize-link {
    margin-left: 12px;
    margin-right: auto;
    white-space: nowrap;
}
.kh-link-right {
    margin-left: auto !important;
    font-size: 11px;
    color: #8E6F2E;
    text-decoration: underline !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Size Grid */
.kh-size-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.kh-size-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.kh-hidden-radio {
    display: none;
}
.kh-size-btn {
    cursor: pointer;
    min-width: 65px;
    flex-shrink: 0;
}
.kh-size-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 15px;
    background: transparent;
    border: 1px solid #E8DFD0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    color: #2C1A14;
    text-transform: uppercase;
}
.kh-size-btn span:hover {
    border-color: #3D0A13;
}
.kh-hidden-radio:checked + span {
    background: #3D0A13;
    color: #fff;
    border-color: #3D0A13;
}

.kh-custom-measurements-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid #E8DFD0;
    border-radius: 0;
    font-size: 13px;
}
.kh-measure-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2C1A14;
    font-weight: 500;
}
.kh-measure-label svg {
    color: #6B5B4A;
}
.kh-add-measurements-trigger {
    color: #2C1A14;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.kh-add-measurements-trigger:hover {
    color: #C9A24A;
}

/* Color Palette */
.kh-color-row {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}
.kh-color-swatch-wrapper {
    cursor: pointer;
    text-align: center;
    position: relative;
}
.kh-color-circle {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 1px solid #B89053;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    transition: all 0.3s ease;
    padding: 3px;
    background-clip: content-box;
}
.kh-color-swatch-wrapper:hover .kh-color-circle {
    border-color: #8E6F2E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.kh-hidden-radio:checked + .kh-color-circle {
    border-color: #2C1A14;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(142, 111, 46, 0.2);
}
.kh-hidden-radio:checked + .kh-color-circle::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: #B89053;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.kh-color-label {
    font-size: 10px;
    color: #2C1A14;
    display: block;
    max-width: 65px;
    line-height: 1.3;
}
.kh-disclaimer {
    font-size: 11px;
    color: #6B5B4A;
    font-style: italic;
}

/* Summary Card */
/* Hide Plugin Injected Custom Style Boxes */
#sum-custom, 
.kh-summary-grid .kh-sum-item:has(#sum-custom),
.kh-summary-grid div[style*="grid-column: 1 / -1"] {
    display: none !important;
    visibility: hidden !important;
}

.kh-summary-card {
    background: transparent;
    border: 1px solid #E8DFD0;
    border-radius: 4px;
    padding: 30px;
    margin-top: 15px;
}
.kh-summary-header {
    font-family: var(--kh-font-serif);
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #8E6F2E;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 500;
}
.kh-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    text-align: center;
}
.kh-sum-item {
    text-align: center;
}
.kh-sum-item span {
    display: block;
    font-size: 11px;
    color: #6B5B4A;
    margin-bottom: 8px;
    font-family: var(--kh-font-sans);
}
.kh-sum-item strong {
    display: block;
    font-size: 13px;
    color: #2C1A14;
    font-weight: 500;
    font-family: var(--kh-font-serif);
}
.kh-edit-link,
a.kh-edit-link.vpc-open-modal-button,
button.kh-edit-link.vpc-open-modal-button {
    font-size: 12px;
    color: #8E6F2E !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-family: var(--kh-font-serif);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: none;
    display: block;
    text-align: center;
    margin: 14px auto 0;
    box-shadow: none !important;
    transition: opacity 0.3s, color 0.3s;
    cursor: pointer;
}
.kh-edit-link:hover,
a.kh-edit-link.vpc-open-modal-button:hover,
button.kh-edit-link.vpc-open-modal-button:hover {
    opacity: 1;
    color: #4B0F1F !important;
    background: transparent !important;
    background-color: transparent !important;
}
.kh-link-underline {
    font-size: 11px;
    color: #C9A24A;
    text-decoration: underline;
}

/* Quantity Selector */
.kh-qty-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid #EADDCD;
    margin-bottom: 5px;
}
.kh-qty-label {
    font-size: 12px;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: #2C1A14;
    text-transform: uppercase;
}
.kh-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #D6C5A8;
    background: #fff;
}
.kh-qty-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8E6F2E;
    font-size: 16px;
    transition: all 0.3s;
}
.kh-qty-btn:hover {
    background: #FBF6EC;
}
.kh-qty-input {
    width: 50px;
    height: 40px;
    border: none !important;
    border-left: 1px solid #D6C5A8 !important;
    border-right: 1px solid #D6C5A8 !important;
    text-align: center;
    font-family: var(--kh-font-serif);
    font-size: 14px;
    font-weight: 600;
    color: #2C1A14;
    padding: 0;
    background: transparent;
    -moz-appearance: textfield;
}
.kh-qty-input::-webkit-outer-spin-button,
.kh-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Actions */
.kh-actions-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.kh-add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background: #3D0A13 !important;
    border: none !important;
    color: #fff !important;
    font-size: 13px !important;
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0.15em;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0;
}
.kh-add-to-cart-btn:hover {
    background: #2C0710 !important;
}
.kh-add-to-cart-btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
}
.kh-add-to-cart-btn.is-loading .kh-btn-text,
.kh-add-to-cart-btn.is-loading .kh-pipe,
.kh-add-to-cart-btn.is-loading .kh-dynamic-price {
    opacity: 0;
}
.kh-add-to-cart-btn.is-loading .kh-btn-spinner {
    display: inline-flex !important;
    position: absolute;
}
.kh-add-to-cart-btn {
    position: relative;
}
.kh-btn-spinner {
    color: #fff;
}

/* Share Copied Tooltip */
.kh-share-icon-btn {
    position: relative;
}
.kh-share-tooltip {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #2C1A14;
    color: #FAF6EF;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    animation: kh-tooltip-fade 1.5s forwards;
}
@keyframes kh-tooltip-fade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Guidance Box */
.kh-guidance-box {
    background: #F5EFE4;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid #EADDCD;
}
.kh-guidance-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.kh-stylist-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.kh-guidance-info strong {
    font-size: 12px;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 5px;
    color: #2C1A14;
}
.kh-guidance-info p {
    font-size: 12px;
    color: #6B5B4A;
    margin: 0;
}
.kh-guidance-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.kh-btn-solid {
    background: #A8853A;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 11px;
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: all 0.3s;
}
.kh-btn-solid:hover {
    background: #8E6F2E;
}
.kh-btn-outline {
    background: transparent;
    color: #A8853A;
    border: 1px solid #A8853A;
    padding: 14px;
    font-size: 11px;
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600 !important;
    text-decoration: none;
    transition: all 0.3s;
}
.kh-btn-outline:hover {
    background: #A8853A;
    color: #fff;
}

/* Craftsmanship & Options */
.kh-craft-grid, .kh-occasion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.kh-occasion-grid {
    grid-template-columns: repeat(6, 1fr);
}
.kh-card-radio {
    cursor: pointer;
}
.kh-card-inner {
    border: 1px solid rgba(201,162,74,0.3);
    background: #fff;
    padding: 15px 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6B5B4A;
    height: 100%;
}
.kh-hidden-radio:checked + .kh-card-inner {
    border-color: #C9A24A;
    background: #FDFBF7;
    position: relative;
}
.kh-hidden-radio:checked + .kh-card-inner::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    color: #C9A24A;
    font-size: 12px;
}

/* Note */
.kh-note-wrap textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid rgba(201,162,74,0.3);
    background: #fff;
    font-family: 'Manrope', sans-serif !important;
    font-size: 13px;
    color: #2C1A14;
    resize: none;
}
.kh-note-wrap textarea::-webkit-input-placeholder {
    font-family: 'Manrope', sans-serif !important;
}
.kh-note-wrap textarea::-moz-placeholder {
    font-family: 'Manrope', sans-serif !important;
}
.kh-note-wrap textarea:-ms-input-placeholder {
    font-family: 'Manrope', sans-serif !important;
}
.kh-note-wrap textarea::-ms-input-placeholder {
    font-family: 'Manrope', sans-serif !important;
}
.kh-note-wrap textarea::placeholder {
    font-family: 'Manrope', sans-serif !important;
}
.kh-note-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #6B5B4A;
    margin-top: 5px;
}

/* Footer Trust */
.kh-footer-trust-bar {
    background: #FAF6EF;
    border-top: 1px solid rgba(201,162,74,0.2);
    padding: 40px 0;
    margin-top: 40px;
}
.kh-footer-trust-bar .kh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.kh-ft-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.kh-ft-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.kh-ft-item svg {
    color: #C9A24A;
}
.kh-ft-item strong {
    font-size: 11px;
    letter-spacing: 0.1em;
    display: block;
}
.kh-ft-item p {
    font-size: 11px;
    color: #6B5B4A;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE — Tablet (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
    .kh-pdp-wrapper {
        margin-top: -20px;
    }
    .kh-pdp-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px 16px;
    }
    .kh-pdp-gallery-sticky {
        position: relative;
        top: 0;
    }

    /* Gallery: thumbnails below on tablet */
    .kh-gallery-grid {
        flex-direction: column-reverse;
    }
    .kh-thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    .kh-thumb {
        width: 70px;
        min-width: 70px;
        /* Removed aspect-ratio: 4/5 to prevent cropping tall images */
    }
    .kh-video-toggle {
        flex-direction: row;
        padding: 10px 15px;
        margin-top: 0;
        min-width: fit-content;
    }

    /* Gallery arrows always visible on touch */
    .kh-gallery-nav {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
    .kh-gallery-prev { left: 10px; }
    .kh-gallery-next { right: 10px; }

    /* Typography */
    .kh-product-title {
        font-size: 42px;
    }
    .kh-product-subtitle {
        font-size: 14px;
    }
    .kh-product-price {
        font-size: 18px;
    }

    /* Trust badges: 2x2 grid */
    .kh-trust-badges {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: flex-start;
    }
    .kh-badge {
        flex: 0 0 calc(50% - 10px);
    }

    /* Size grid: 4 columns */
    .kh-size-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Color row: wrap */
    .kh-color-row {
        flex-wrap: wrap;
        gap: 15px;
    }

    /* Summary: 3 columns */
    .kh-summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    /* Craft grids */
    .kh-craft-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kh-occasion-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Guidance */
    .kh-guidance-actions {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer trust: 2 columns */
    .kh-ft-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   RESPONSIVE — Small Tablet / Large Phone (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .kh-pdp-wrapper {
        margin-top: -10px;
        padding-bottom: 40px;
    }
    .kh-pdp-layout {
        gap: 25px;
        padding: 20px 14px;
    }

    /* Breadcrumb */
    .kh-breadcrumb-bar {
        padding: 10px 0;
        font-size: 10px;
    }

    /* Typography */
    .kh-product-title {
        font-size: 34px;
    }
    .kh-product-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
    }
    .kh-product-price {
        font-size: 17px;
        margin-bottom: 15px;
    }
    .kh-product-desc {
        font-size: 12px;
    }

    /* Step sections */
    .kh-step-section {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }
    .kh-step-header {
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 15px;
        justify-content: flex-start;
    }
    .kh-step-num {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    .kh-step-title {
        font-size: 11px;
        letter-spacing: 0.08em;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .kh-customize-link {
        margin-left: 10px;
        margin-right: auto;
        font-size: 10px;
    }
    .kh-link-right {
        width: auto;
        margin-left: auto !important;
        margin-top: 0;
    }

    /* Size grid: 3 columns */
    .kh-size-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .kh-size-btn span {
        height: 42px;
        font-size: 11px;
    }

    /* Summary: 2 columns */
    .kh-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 10px;
    }
    .kh-sum-item {
        text-align: left;
    }
    .kh-sum-item span {
        font-size: 10px;
    }
    .kh-sum-item strong {
        font-size: 12px;
    }
    .kh-edit-link,
    a.kh-edit-link.vpc-open-modal-button,
    button.kh-edit-link.vpc-open-modal-button {
        display: block;
        text-align: center;
        margin: 10px auto 0;
        font-size: 11px;
        background: transparent !important;
        padding: 0 !important;
        width: auto !important;
    }
    .kh-summary-card {
        padding: 18px;
    }

    /* Actions */
    .kh-add-to-cart-btn {
        padding: 16px;
        font-size: 12px !important;
    }

    /* Guidance */
    .kh-guidance-box {
        padding: 16px;
        margin-bottom: 25px;
    }
    .kh-guidance-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .kh-btn-solid, .kh-btn-outline {
        padding: 14px 12px;
        font-size: 10px;
    }

    /* Craft / Occasion grids */
    .kh-craft-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kh-occasion-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer trust: single column */
    .kh-ft-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .kh-footer-trust-bar {
        padding: 25px 0;
        margin-top: 25px;
    }
}

/* ==========================================================================
   RESPONSIVE — Mobile (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .kh-pdp-wrapper {
        margin-top: 0;
        padding-bottom: 30px;
    }
    .kh-pdp-layout {
        gap: 20px;
        padding: 15px 12px;
    }

    /* Breadcrumb */
    .kh-breadcrumb-bar {
        font-size: 9px;
        letter-spacing: 0.05em;
        padding: 8px 0;
    }
    .kh-breadcrumb-bar a {
        margin: 0 3px;
    }

    /* Gallery */
    .kh-thumbnails {
        gap: 8px;
    }
    .kh-thumb {
        width: 56px;
        min-width: 56px;
    }
    .kh-gallery-nav {
        width: 32px;
        height: 32px;
    }
    .kh-gallery-nav svg {
        width: 16px;
        height: 16px;
    }
    .kh-gallery-prev { left: 6px; }
    .kh-gallery-next { right: 6px; }
    .kh-gallery-actions {
        gap: 12px;
        padding: 12px 0;
        font-size: 10px;
    }
    .kh-video-toggle {
        font-size: 8px;
        padding: 8px 10px;
    }

    /* Typography */
    .kh-arrival-tag {
        font-size: 9px;
        margin-bottom: 6px;
    }
    .kh-product-title {
        font-size: 28px;
        margin-bottom: 6px;
    }
    .kh-product-subtitle {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .kh-product-price {
        font-size: 16px;
        margin-bottom: 12px;
    }
    .kh-product-desc {
        font-size: 11px;
        line-height: 1.5;
    }

    .kh-trust-badges {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
        margin-bottom: 25px;
        padding: 20px 0;
        border-top: 1px solid #E8DFD0;
        border-bottom: 1px solid #E8DFD0;
    }
    .kh-badge {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .kh-badge svg {
        width: 28px;
        height: 28px;
    }

    /* Step sections */
    .kh-step-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    .kh-step-header {
        margin-bottom: 12px;
    }
    .kh-step-num {
        width: 26px;
        height: 26px;
        font-size: 11px;
        margin-right: 8px;
    }
    .kh-step-title {
        font-size: 11px;
        letter-spacing: 0.08em;
    }
    .kh-link-right {
        font-size: 10px;
        margin-left: 34px;
    }

    /* Size grid: 3 columns with bigger touch targets */
    .kh-size-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .kh-size-btn span {
        height: 44px;
        font-size: 11px;
    }

    /* Color row */
    .kh-color-row {
        gap: 12px;
    }
    .kh-color-circle {
        width: 38px;
        height: 38px;
    }
    .kh-color-label {
        font-size: 9px;
    }

    /* Summary */
    .kh-summary-card {
        padding: 15px;
    }
    .kh-summary-header {
        font-size: 10px;
        margin-bottom: 14px;
    }
    .kh-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 14px;
    }
    .kh-sum-item span {
        font-size: 9px;
    }
    .kh-sum-item strong {
        font-size: 10px;
    }

    /* Custom measurements row */
    .kh-custom-measurements-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px;
    }

    /* Actions — full-width stacked */
    .kh-actions-row {
        gap: 10px;
        margin-bottom: 20px;
    }
    .kh-add-to-cart-btn {
        padding: 16px;
        font-size: 12px !important;
        letter-spacing: 0.1em;
    }

    /* Guidance */
    .kh-guidance-box {
        padding: 14px;
        margin-bottom: 20px;
    }
    .kh-guidance-info {
        gap: 10px;
        margin-bottom: 14px;
    }
    .kh-stylist-img {
        width: 40px;
        height: 40px;
    }
    .kh-guidance-info strong {
        font-size: 10px;
    }
    .kh-guidance-info p {
        font-size: 11px;
    }
    .kh-guidance-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .kh-btn-solid, .kh-btn-outline {
        padding: 14px;
        font-size: 10px;
    }

    /* Craft / Occasion */
    .kh-craft-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .kh-occasion-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .kh-card-inner {
        padding: 10px 4px;
        font-size: 10px;
        gap: 5px;
    }

    /* Note */
    .kh-note-wrap textarea {
        height: 80px;
        padding: 12px;
        font-size: 12px;
    }

    /* Footer trust: 2 columns */
    .kh-ft-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .kh-footer-trust-bar {
        padding: 20px 0;
        margin-top: 20px;
    }
    .kh-ft-item {
        gap: 10px;
    }
    .kh-ft-item strong {
        font-size: 10px;
    }
    .kh-ft-item p {
        font-size: 10px;
    }
}

/* ==========================================================================
   Mobile Gallery – Arrow Visibility, No-Crop, & Touch Swipe (≤768px)
   ========================================================================== */
@media (max-width: 768px) {
    .kh-gallery-grid {
        flex-direction: column !important;
    }
    .kh-thumbnails {
        display: flex !important;
        flex-direction: row !important;
        order: 2 !important;
        width: 100% !important;
        overflow-x: auto !important;
        gap: 8px !important;
        padding: 10px 0 0 0 !important;
        -webkit-overflow-scrolling: touch;
    }
    .kh-thumbnails::-webkit-scrollbar {
        display: none;
    }
    .kh-thumb {
        flex: 0 0 60px !important;
        width: 60px !important;
    }
    .kh-thumb img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
    .kh-main-image {
        order: 1 !important;
        width: 100% !important;
        overflow: visible !important;
        /* Enable touch actions for swipe support */
        touch-action: pan-y pinch-zoom;
        -webkit-user-select: none;
        user-select: none;
    }
    /* Show arrows on mobile */
    .kh-gallery-nav {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 34px !important;
        height: 34px !important;
    }
    .kh-gallery-prev { left: 8px !important; }
    .kh-gallery-next { right: 8px !important; }
}

/* FORCE UNCROPPED THUMBNAILS – no cropping on thumb strip */
.kh-thumb img {
    object-fit: contain !important;
    height: auto !important;
    width: 100% !important;
}
/* Main image: natural size, no letterboxing */
.kh-main-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: fill !important;
}

/* ==========================================================================
   Size Guide Modal Fallback
   ========================================================================== */
#size-guide-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999 !important;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
}
#size-guide-modal.show {
    display: flex !important;
}

#size-guide-modal .modal__container {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 20px;
    /* Force absolute centering to prevent Ecomus JS from breaking flexbox */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 100000;
}

#size-guide-modal .modal__backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

body.modal-open {
    overflow: hidden !important;
}

/* ============================================================
   Custom Measurements Form Overrides
   ============================================================ */
#csvp-inline-form-wrapper {
    display: none;
    visibility: visible !important;
    opacity: 1 !important;
    border: 1px solid #EADDCD !important;
    background: #FDFBF7 !important;
    padding: 25px !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
}

#csvp-inline-form-wrapper h3 {
    font-family: var(--kh-font-serif) !important;
    font-size: 16px !important;
    letter-spacing: 0.05em !important;
    color: #2C1A14 !important;
    text-transform: uppercase !important;
    margin-bottom: 20px !important;
}

.kh-custom-measurements-row.active {
    border-color: #3F0A14 !important;
    background: #fdf5f0 !important;
}

#sum-custom, 
[id^="sum-custom"],
.wc_dress_customizer_pro_summary_item {
    display: none !important;
}

/* Button shake animation for validation feedback */
@keyframes kh-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ==========================================================================
   Wishlist Elements — Hidden via CSS (moved from inline wp_head style)
   ========================================================================== */
.wcboost-wishlist-button,
.wcboost-wishlist-button-wrapper,
.ecomus-wishlist-button,
.tinv-wishlist,
.yith-wcwl-add-to-wishlist,
.add-to-wishlist,
a.add_to_wishlist,
button.add_to_wishlist,
.wishlist-button,
.product-wishlist,
.single-product .wcboost-wishlist-button,
.kh-pdp-wrapper .wcboost-wishlist-button,
.kh-pdp-wrapper [class*="wishlist"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* =========================================================
   Bottom-of-PDP Carousels (You May Also Like / Recently Viewed)
   ========================================================= */
.kh-pdp-carousel-section {
    padding: 64px 0 56px;
    background: #FAF6EF;
}
.kh-pdp-carousel-section + .kh-pdp-carousel-section {
    padding-top: 16px;
    border-top: 1px solid rgba(184, 144, 83, 0.18);
}
.kh-pdp-carousel-head {
    text-align: center;
    margin-bottom: 36px;
}
.kh-pdp-carousel-eyebrow {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: #B89053;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.kh-pdp-carousel-title {
    font-family: 'Bodoni Moda', serif;
    font-size: 32px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.01em;
}
.kh-pdp-carousel-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #B89053;
    margin: 14px auto 0;
}

/* Swiper container */
.kh-pdp-carousel {
    position: relative;
    overflow: hidden;
    padding: 4px 0 8px;
}
.kh-pdp-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* Fallback when Swiper hasn't initialized — horizontal scroll-snap */
.kh-pdp-carousel:not(.swiper-initialized) .swiper-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    scrollbar-width: none;
}
.kh-pdp-carousel:not(.swiper-initialized) .swiper-wrapper::-webkit-scrollbar { display: none; }
.kh-pdp-carousel:not(.swiper-initialized) .kh-pdp-card-slide {
    flex: 0 0 calc((100% - 80px) / 5);
    scroll-snap-align: start;
}

/* Card */
.kh-pdp-card-slide { height: auto; }
.kh-pdp-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    height: 100%;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.kh-pdp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -16px rgba(0,0,0,0.18);
}
.kh-pdp-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f4f0e7;
}
.kh-pdp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kh-pdp-card:hover .kh-pdp-card-img img {
    transform: none;
}
.kh-pdp-card-body {
    padding: 12px 16px 14px;
    text-align: center;
}
.kh-pdp-card-title {
    font-family: 'Bodoni Moda', serif;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.4em;
}
.kh-pdp-card-price {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #B89053;
    margin-bottom: 6px;
    min-height: 1em;
}
.kh-pdp-card-price del { color: #999; font-weight: 400; margin-right: 6px; }
.kh-pdp-card-price ins { text-decoration: none; }
.kh-pdp-card-link {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #1a1a1a;
    border-bottom: 1px solid #B89053;
    padding-bottom: 2px;
    transition: color 0.25s ease;
}
.kh-pdp-card:hover .kh-pdp-card-link { color: #B89053; }

/* Nav arrows — overlaid inside the carousel, vertically centered on the product image */
.kh-pdp-carousel-nav {
    position: absolute;
    top: calc(40% * (4 / 5));      /* ~middle of the 4:5 image */
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5dccb;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px -6px rgba(0,0,0,0.22);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    padding: 0;
    line-height: 0;
}
.kh-pdp-carousel-nav svg { display: block; }
.kh-pdp-carousel-nav:hover {
    background: #B89053;
    color: #fff;
    border-color: #B89053;
}
.kh-pdp-carousel-prev { left: 10px; }
.kh-pdp-carousel-next { right: 10px; }
.kh-pdp-carousel-nav.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1279px) {
    .kh-pdp-carousel:not(.swiper-initialized) .kh-pdp-card-slide {
        flex: 0 0 calc((100% - 40px) / 3);
    }
    .kh-pdp-carousel-title { font-size: 28px; }
}
@media (max-width: 767px) {
    .kh-pdp-carousel-section { padding: 44px 0 24px; }
    .kh-pdp-carousel-head { margin-bottom: 24px; }
    .kh-pdp-carousel-title { font-size: 22px; }
    .kh-pdp-carousel:not(.swiper-initialized) .kh-pdp-card-slide {
        flex: 0 0 calc((100% - 20px) / 2);
    }
    .kh-pdp-card-body { padding: 14px 10px 18px; }
    .kh-pdp-card-title { font-size: 14px; }
    .kh-pdp-card-price { font-size: 13px; }
    .kh-pdp-carousel-nav { width: 36px; height: 36px; }
    .kh-pdp-carousel-prev { left: 6px; }
    .kh-pdp-carousel-next { right: 6px; }
}

