/* =========================================================
   CUSTOM SINGLE PRODUCT PAGE — SPORTY & RICH STYLE
   Hello Elementor Child Theme
   ========================================================= */

/* Reset & Global Overrides for Single Product */
body.single-product {
    background-color: #ffffff !important;
}

/* Ensure child theme header displays cleanly with dark text on white bg */
body.single-product .dpx-header {
    position: relative !important;
    margin-bottom: 0 !important;
    background: #ffffff !important;
    color: #111111 !important;
    border-bottom: 1px solid #e4e4e4 !important;
    box-shadow: none !important;
}

body.single-product .dpx-header a,
body.single-product .dpx-header button,
body.single-product .dpx-header .dpx-logo a,
body.single-product .dpx-header .dpx-item > .dpx-top,
body.single-product .dpx-header .dpx-burger span {
    color: #111111 !important;
}

body.single-product .dpx-header.is-fixed {
    position: fixed !important;
    top: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05) !important;
}

body.admin-bar.single-product .dpx-header.is-fixed {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar.single-product .dpx-header.is-fixed {
        top: 46px !important;
    }
}

/* Base Container */
.dpx-product-page {
    background: #ffffff;
    width: 100%;
    min-height: 80vh;
    padding-bottom: 80px;
    box-sizing: border-box;
    font-family: 'Jost', sans-serif !important;
    color: #111111;
}

.dpx-product-page *,
.dpx-product-page *::before,
.dpx-product-page *::after {
    box-sizing: border-box;
    border-radius: 0 !important;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.dpx-breadcrumb {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 60px 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777777;
}

.dpx-breadcrumb a {
    color: #777777;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dpx-breadcrumb a:hover {
    color: #111111;
}

.dpx-breadcrumb .sep {
    margin: 0 8px;
    color: #cccccc;
}

.dpx-breadcrumb .current {
    color: #111111;
}

/* =========================================================
   MAIN PRODUCT GRID: Left Gallery (50%) + Right Summary (50%)
   ========================================================= */
.dpx-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 30px 60px 40px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: flex-start;
}

/* LEFT: 2x2 Image Grid */
.dpx-product-gallery {
    width: 100%;
}

.dpx-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
}

.dpx-image-grid.is-single {
    grid-template-columns: 1fr;
}

.dpx-image-item {
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    position: relative;
    width: 100%;
}

.dpx-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.dpx-image-item:hover img {
    transform: scale(1.02);
}

/* RIGHT: Sticky Summary Column */
.dpx-product-summary {
    position: sticky;
    top: 90px;
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    padding-top: 4px;
}

body.admin-bar .dpx-product-summary {
    top: 122px;
}

@media (max-width: 782px) {
    body.admin-bar .dpx-product-summary {
        top: 136px;
    }
}

/* Title & Price */
.dpx-product-title {
    font-family: 'Jost', sans-serif !important;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #111111;
    margin: 0 0 10px;
    line-height: 1.35;
}

.dpx-product-summary .dpx-price,
.dpx-product-summary .price {
    font-family: 'Jost', sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    color: #111111;
    margin: 0 0 28px;
    display: block;
    letter-spacing: 0.02em;
}

.dpx-product-summary .price del {
    color: #888888;
    margin-right: 8px;
    text-decoration: line-through;
    font-weight: 400;
}

.dpx-product-summary .price ins {
    text-decoration: none;
    font-weight: 400;
    color: #111111;
}

/* =========================================================
   SIZE SECTION
   Connected border grid: XS | S | M | L | XL
   ========================================================= */
.dpx-size-section {
    margin: 28px 0;
}

.dpx-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #111111;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.dpx-size-header-left {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111111;
}

.dpx-size-chart-trigger {
    background: transparent;
    border: 0;
    padding: 0;
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-transform: none;
    font-size: 13px;
    font-family: 'Jost', sans-serif !important;
    cursor: pointer;
}

.dpx-size-chart-trigger:hover {
    color: #555555;
}

/* Single outer border + connected inner borders */
.dpx-size-grid {
    display: flex;
    width: 100%;
    border: 1px solid #111111;
    background: #ffffff;
    transition: outline 0.2s ease;
}

.dpx-size-section.has-error .dpx-size-grid {
    outline: 2px solid #b00020;
}

.dpx-size-error-msg {
    display: none;
    color: #b00020;
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.dpx-size-section.has-error .dpx-size-error-msg {
    display: block;
}

.dpx-size-option {
    flex: 1 1 0;
    min-width: 0;
    height: 50px;
    background: #ffffff;
    color: #111111;
    border: 0;
    border-right: 1px solid #111111;
    font-family: 'Jost', sans-serif !important;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    outline: none;
}

.dpx-size-option:last-child {
    border-right: 0;
}

.dpx-size-option:hover:not(.is-out-of-stock),
.dpx-size-option.is-selected {
    background: #111111 !important;
    color: #ffffff !important;
}

.dpx-size-option.is-out-of-stock {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* =========================================================
   ADD TO CART BUTTON
   ========================================================= */
.dpx-add-to-cart-wrap {
    margin: 24px 0 32px;
}

.dpx-add-to-cart {
    display: block;
    width: 100%;
    padding: 19px 24px;
    background: #111111;
    color: #ffffff;
    border: 1px solid #111111;
    font-family: 'Jost', sans-serif !important;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.25s ease, background-color 0.2s ease;
    outline: none;
}

.dpx-add-to-cart:hover:not(:disabled) {
    opacity: 0.88;
}

.dpx-add-to-cart.is-loading {
    opacity: 0.65;
    cursor: wait;
}

.dpx-add-to-cart.is-added {
    background: #111111;
    opacity: 1;
}

.dpx-add-to-cart:disabled,
.dpx-add-to-cart.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* =========================================================
   ACCORDION (4 sections)
   ========================================================= */
.dpx-accordion {
    border-top: 1px solid #e4e4e4;
    margin-top: 32px;
    width: 100%;
}

.dpx-acc-item {
    border-bottom: 1px solid #e4e4e4;
}

.dpx-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 0;
    background: transparent;
    border: 0;
    font-family: 'Jost', sans-serif !important;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: #111111;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.dpx-acc-header:hover {
    color: #555555;
}

.dpx-acc-title {
    font-size: 15px;
    font-weight: 400;
}

.dpx-acc-icon {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    width: 18px;
    text-align: right;
    user-select: none;
}

.dpx-acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Jost', sans-serif !important;
    font-size: 13.5px;
    line-height: 1.65;
    color: #444444;
}

.dpx-acc-inner {
    padding: 0 0 20px;
}

.dpx-acc-inner p {
    margin: 0 0 10px;
}

.dpx-acc-inner p:last-child {
    margin-bottom: 0;
}

.dpx-acc-item.is-open .dpx-acc-content {
    max-height: 600px;
}

/* =========================================================
   COMPLETE THE LOOK (Cross-sells)
   ========================================================= */
.dpx-complete-look {
    max-width: 1600px;
    margin: 60px auto 0;
    padding: 0 60px;
}

.dpx-section-title {
    font-family: 'Jost', sans-serif !important;
    font-size: 22px;
    font-weight: 400;
    color: #111111;
    letter-spacing: 0.02em;
    margin: 0 0 24px;
    text-align: left;
}

.dpx-ctl-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
}

.dpx-ctl-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    padding: 16px;
    background: #f9f9f9;
    align-items: center;
}

.dpx-ctl-image {
    width: 100px;
    height: 120px;
    background: #ffffff;
    overflow: hidden;
    flex-shrink: 0;
}

.dpx-ctl-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dpx-ctl-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dpx-ctl-name {
    font-size: 14px;
    font-weight: 400;
    color: #111111;
    text-decoration: none;
    font-family: 'Jost', sans-serif !important;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dpx-ctl-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dpx-ctl-price {
    font-size: 13px;
    color: #111111;
    font-family: 'Jost', sans-serif !important;
    margin-bottom: 6px;
}

.dpx-ctl-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dpx-ctl-size-select {
    flex: 0 0 90px;
    width: 90px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #111111;
    background: #ffffff;
    font-family: 'Jost', sans-serif !important;
    font-size: 12px;
    color: #111111;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.dpx-ctl-atc {
    flex: 1 1 auto;
    height: 40px;
    padding: 0 16px;
    background: #111111;
    color: #ffffff;
    border: 1px solid #111111;
    font-family: 'Jost', sans-serif !important;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.dpx-ctl-atc:hover:not(:disabled) {
    opacity: 0.85;
}

.dpx-ctl-atc.is-loading {
    opacity: 0.6;
    cursor: wait;
}

/* =========================================================
   CAROUSEL SECTIONS (Related + Recently Viewed)
   ========================================================= */
.dpx-carousel-section {
    max-width: 1600px;
    margin: 80px auto 0;
    padding: 0 60px;
}

.dpx-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.dpx-carousel-header .dpx-section-title {
    margin: 0;
}

.dpx-carousel-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dpx-carousel-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #111111;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0;
    outline: none;
}

.dpx-carousel-btn:hover:not(:disabled) {
    opacity: 0.55;
}

.dpx-carousel-btn:disabled,
.dpx-carousel-btn.is-disabled {
    opacity: 0.25;
    cursor: default;
}

.dpx-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.dpx-carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    width: 100%;
}

.dpx-carousel-item {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 0;
}

.dpx-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.dpx-product-card-image {
    background: #f5f5f5;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    width: 100%;
}

.dpx-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.dpx-product-card:hover .dpx-product-card-image img {
    transform: scale(1.03);
}

.dpx-product-card-title {
    font-family: 'Jost', sans-serif !important;
    font-size: 14px;
    font-weight: 400;
    color: #111111;
    margin: 0 0 4px;
    line-height: 1.35;
    text-align: center;
}

.dpx-product-card-price {
    font-family: 'Jost', sans-serif !important;
    font-size: 13px;
    color: #111111;
    text-align: center;
    letter-spacing: 0.02em;
}

.dpx-product-card-price .woocommerce-Price-amount {
    font-size: 13px;
}

/* =========================================================
   SIZE CHART MODAL
   ========================================================= */
.dpx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.dpx-modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

.dpx-modal-card {
    background: #ffffff;
    max-width: 520px;
    width: 100%;
    padding: 36px 32px 32px;
    border: 1px solid #111111;
    position: relative;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.dpx-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: 0;
    font-size: 26px;
    cursor: pointer;
    color: #111111;
    line-height: 1;
    padding: 4px;
}

.dpx-modal-title {
    font-family: 'Jost', sans-serif !important;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 20px;
    color: #111111;
}

.dpx-size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.dpx-size-table th,
.dpx-size-table td {
    padding: 10px 12px;
    border: 1px solid #e4e4e4;
    text-align: center;
    color: #111111;
}

.dpx-size-table th {
    background: #f9f9f9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================================================
   RESPONSIVE — TABLET & MOBILE
   ========================================================= */
@media (max-width: 1024px) {
    .dpx-breadcrumb {
        padding: 18px 24px 0;
    }

    .dpx-product-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 20px 24px 40px;
    }

    .dpx-product-summary {
        position: static;
        max-width: 100%;
        margin-left: 0;
    }

    .dpx-size-option {
        height: 46px;
        font-size: 13px;
    }

    .dpx-add-to-cart {
        padding: 17px 20px;
        font-size: 12.5px;
    }

    .dpx-complete-look,
    .dpx-carousel-section {
        padding: 0 24px;
        margin-top: 50px;
    }

    .dpx-ctl-list {
        max-width: 100%;
    }

    .dpx-carousel-item {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .dpx-section-title {
        font-size: 19px;
    }

    .dpx-acc-header {
        font-size: 14.5px;
        padding: 16px 0;
    }
}

@media (max-width: 600px) {
    .dpx-breadcrumb {
        padding: 14px 16px 0;
        font-size: 10px;
    }

    .dpx-product-grid {
        padding: 16px 16px 32px;
        gap: 24px;
    }

    .dpx-image-grid {
        gap: 3px;
    }

    .dpx-size-option {
        height: 44px;
        font-size: 12px;
    }

    .dpx-add-to-cart {
        padding: 16px 20px;
        font-size: 12px;
    }

    .dpx-complete-look,
    .dpx-carousel-section {
        padding: 0 16px;
        margin-top: 40px;
    }

    .dpx-ctl-item {
        grid-template-columns: 80px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .dpx-ctl-image {
        width: 80px;
        height: 100px;
    }

    .dpx-ctl-name {
        font-size: 13px;
    }

    .dpx-ctl-size-select {
        flex: 0 0 75px;
        width: 75px;
        font-size: 11px;
        height: 38px;
        padding: 0 6px;
    }

    .dpx-ctl-atc {
        font-size: 11px;
        padding: 0 12px;
        height: 38px;
    }

    .dpx-carousel-item {
        flex: 0 0 calc((100% - 12px) / 2);
    }

    .dpx-modal-card {
        padding: 28px 20px 24px;
    }
}