/* ============================================================
   PRODUCT DETAILS PAGE STYLES
   Refined, modern, human-crafted e-commerce presentation
   ============================================================ */

.markopedia-product {
    background: #ffffff;
    color: var(--shop-ink, #242044);
}

.product-details-section {
    padding: 132px 0 76px;
    background: #ffffff;
}

.product-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 13px;
    color: #8c89a0;
}

.product-breadcrumbs a {
    color: var(--shop-primary, #6254e7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.product-breadcrumbs a:hover {
    color: var(--shop-primary-dark, #4f42c9);
}

.product-breadcrumbs span[aria-hidden="true"] {
    color: #c4c1d2;
}

.product-breadcrumbs > span:last-child {
    color: var(--shop-ink, #242044);
    font-weight: 600;
}

/* Two-column product showcase */
.product-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: clamp(36px, 5vw, 68px);
    align-items: start;
}

/* Gallery presentation */
.product-gallery {
    min-width: 0;
}

.product-gallery__main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #ebe8f2;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f6fb;
}

.product-gallery__main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__main .swiper-wrapper,
.product-gallery__main .swiper-slide {
    height: 100%;
}

.product-gallery__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #ebe8f2;
    border-radius: 50%;
    background: #fff;
    color: var(--shop-primary, #6254e7);
    cursor: pointer;
    transform: translateY(-50%);
}

.product-gallery__arrow--prev { inset-inline-start: 14px; }
.product-gallery__arrow--next { inset-inline-end: 14px; }
.product-gallery__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-gallery__arrow.swiper-button-disabled { opacity: .45; cursor: default; }
[dir="rtl"] .product-gallery__arrow svg { transform: scaleX(-1); }

.product-gallery__pagination {
    position: absolute;
    z-index: 2;
    inset-inline: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.product-gallery__pagination .swiper-pagination-bullet { margin: 0; background: #69747f; opacity: .5; }
.product-gallery__pagination .swiper-pagination-bullet-active { background: var(--shop-primary, #6254e7); opacity: 1; }

.product-gallery__thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-top: 12px;
    padding: 2px 2px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.product-gallery__thumb {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f6fb;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.72;
}

.product-gallery__thumb:hover {
    opacity: 1;
    border-color: #d1cde0;
}

.product-gallery__thumb.is-active {
    border-color: var(--shop-primary, #6254e7);
    opacity: 1;
}

.product-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Summary info */
.product-summary {
    padding-top: 4px;
    min-width: 0;
    text-align: start;
}

.product-summary__category {
    display: inline-block;
    color: var(--shop-primary, #6254e7);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 8px;
}

.product-summary h1 {
    margin: 0 0 12px;
    color: var(--shop-ink, #242044);
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.025em;
    word-break: break-word;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8c89a0;
    font-size: 13px;
    margin-bottom: 18px;
}

.product-rating b {
    color: #dedbe8;
    font-size: 16px;
}

.product-rating b.is-filled,
.product-rating--small > span:first-child {
    color: #f59e0b;
}

.product-rating a {
    color: #716d89;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.product-rating a:hover {
    color: var(--shop-primary, #6254e7);
}

/* Price banner */
.product-summary__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
    padding: 16px 0;
    border-top: 1px solid #ebe8f2;
    border-bottom: 1px solid #ebe8f2;
    line-height: 1;
}

.product-summary__price strong {
    color: var(--shop-ink, #242044);
    font-size: 30px;
    font-weight: 800;
}

.product-summary__price small {
    font-size: 14px;
    font-weight: 600;
    color: #716d89;
}

.product-summary__price del {
    color: #a8a4b6;
    font-size: 16px;
    font-weight: 500;
    text-decoration: line-through;
}

.product-summary__discount {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.product-summary__intro {
    margin: 0 0 20px;
    color: #696580;
    font-size: 15px;
    line-height: 1.75;
}

.product-availability {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 24px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.product-availability span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.product-availability.is-available {
    background: #ecfdf5;
    color: #059669;
}

.product-availability.is-unavailable {
    background: #fef2f2;
    color: #dc2626;
}

/* Purchase section */
.product-purchase {
    display: grid;
    gap: 16px;
    margin-top: 4px;
}

.product-purchase > label {
    display: grid;
    gap: 6px;
    color: var(--shop-ink, #242044);
    font-size: 13px;
    font-weight: 700;
}

.product-purchase select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 14px;
    padding-inline-end: 36px;
    border: 1px solid #dcd8e8;
    border-radius: 10px;
    background: #ffffff;
    color: var(--shop-ink, #242044);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23716d89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

[dir="rtl"] .product-purchase select {
    background-position: left 14px center;
}

.product-purchase select:focus {
    border-color: var(--shop-primary, #6254e7);
    box-shadow: 0 0 0 3px rgba(98, 84, 231, 0.12);
    outline: none;
}

/* Action controls */
.product-purchase__actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
}

.product-quantity {
    flex: 0 0 112px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: stretch;
    overflow: hidden;
    height: 48px;
    min-height: 48px;
    border: 1px solid #dcd8e8;
    border-radius: 10px;
    background: #ffffff;
}

.product-quantity button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: #f8f7fc;
    color: #555070;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.product-quantity button:hover {
    background: #eeeaf9;
    color: var(--shop-primary, #6254e7);
}

.product-quantity input[type="number"] {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-inline: 1px solid #dcd8e8;
    background: transparent;
    color: var(--shop-ink, #242044);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.product-quantity input[type="number"]::-webkit-inner-spin-button,
.product-quantity input[type="number"]::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.product-add-button {
    flex: 1;
    height: 48px;
    min-height: 48px;
    border-radius: 10px;
    background: var(--shop-primary, #6254e7);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(98, 84, 231, 0.22);
}

.product-add-button:hover:not(:disabled) {
    background: var(--shop-primary-dark, #4f42c9);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(98, 84, 231, 0.28);
}

.product-add-button:disabled {
    background: #eceaf3;
    color: #9f9baa;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.product-add-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.product-wishlist-button {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #dcd8e8;
    background: #ffffff;
    color: #6e6b87;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.product-wishlist-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.product-wishlist-button:hover {
    border-color: #d1cde0;
    color: #e53e3e;
    background: #fff8f8;
}

.product-wishlist-button.is-active {
    border-color: rgba(229, 62, 62, 0.25);
    background: #fff5f5;
    color: #e53e3e;
}

.product-wishlist-button.is-active svg {
    fill: currentColor;
}

.product-wishlist-button span {
    display: none;
}

/* ============================================================
   PRODUCT INSIGHTS / DESCRIPTION & REVIEWS
   ============================================================ */

.product-insights-section {
    position: relative;
    padding: 68px 0 76px;
    border-top: 1px solid #ebe8f2;
    background: #faf9fd;
}

.product-insights__header {
    max-width: 680px;
    margin-bottom: 36px;
    text-align: start;
}

.product-insights__label,
.product-insights__header > span {
    display: block;
    margin-bottom: 6px;
    color: var(--shop-primary, #6254e7);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-insights__header h2,
.related-products__heading h2 {
    margin: 0 0 10px;
    color: var(--shop-ink, #242044);
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.product-insights__header p {
    margin: 0;
    color: #716d89;
    font-size: 15px;
    line-height: 1.7;
}

.product-insights__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 24px;
    align-items: start;
}

.product-description-card,
.product-reviews-panel {
    border: 1px solid #ebe8f2;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(36, 32, 68, 0.04);
}

.product-description-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: clamp(22px, 3.5vw, 32px);
    text-align: start;
}

.product-insights__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #f0edfa;
    color: var(--shop-primary, #6254e7);
}

.product-insights__icon svg,
.product-reviews-empty svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-description-card h3,
.product-reviews-panel h3 {
    margin: 0;
    color: var(--shop-ink, #242044);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.product-description-card__copy {
    margin-top: 14px;
    color: #58546f;
    font-size: 14px;
    line-height: 1.85;
    white-space: normal;
}

.product-reviews-panel {
    overflow: hidden;
    text-align: start;
}

.product-reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px 28px;
    background: #fcfbfe;
    border-bottom: 1px solid #ebe8f2;
}

.product-reviews-summary__score {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-reviews-summary__score > strong {
    color: var(--shop-ink, #242044);
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.product-reviews-summary__score b {
    color: #dedbe8;
    font-size: 15px;
}

.product-reviews-summary__score b.is-filled {
    color: #f59e0b;
}

.product-reviews-summary__score p {
    margin: 4px 0 0;
    color: #8c89a0;
    font-size: 12px;
}

.product-rating-bars {
    display: grid;
    gap: 6px;
}

.product-rating-bars > div {
    display: grid;
    grid-template-columns: 32px minmax(70px, 1fr) 20px;
    gap: 8px;
    align-items: center;
    color: #8c89a0;
    font-size: 11px;
}

.product-rating-bars i {
    overflow: hidden;
    height: 5px;
    border-radius: 99px;
    background: #e9e6f2;
}

.product-rating-bars i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f59e0b;
}

.product-rating-bars em {
    font-style: normal;
    text-align: end;
}

.product-reviews-panel__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px 14px;
    border-bottom: 1px solid #f2eff8;
}

.product-reviews-panel__heading > span {
    color: #8c89a0;
    font-size: 12px;
    font-weight: 600;
}

.product-reviews-list {
    display: grid;
    gap: 12px;
    padding: 18px 28px 24px;
}

.product-review {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #ebe8f2;
    border-radius: 12px;
    background: #ffffff;
}

.product-review__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0edfa;
    color: var(--shop-primary, #6254e7);
    font-size: 14px;
    font-weight: 700;
}

.product-review__content {
    min-width: 0;
}

.product-review__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    color: var(--shop-ink, #242044);
}

.product-review__head > div {
    display: grid;
    gap: 1px;
}

.product-review__head > div span {
    color: #059669;
    font-size: 10px;
    font-weight: 700;
}

.product-review__stars {
    color: #f59e0b;
    font-size: 13px;
    white-space: nowrap;
}

.product-review p {
    margin: 8px 0 0;
    color: #58546f;
    font-size: 13px;
    line-height: 1.65;
}

.product-review time {
    display: block;
    margin-top: 6px;
    color: #aaa7ba;
    font-size: 11px;
}

.product-reviews-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 32px 20px;
    border: 1px dashed #dcd8e8;
    border-radius: 14px;
    color: #8c89a0;
    text-align: center;
}

.product-reviews-empty svg {
    width: 28px;
    height: 28px;
    color: var(--shop-primary, #6254e7);
}

.product-reviews-empty p {
    margin: 0;
    font-size: 13px;
}

/* ============================================================
   RELATED PRODUCTS SECTION
   ============================================================ */

.related-products-section {
    padding: 68px 0 84px;
    border-top: 1px solid #ebe8f2;
    background: #ffffff;
}

.related-products__heading {
    margin-bottom: 28px;
    text-align: start;
}

.related-products__heading p {
    margin: 6px 0 0;
    color: #716d89;
    font-size: 15px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

/* ============================================================
   RESPONSIVE LAYOUTS
   ============================================================ */

@media (max-width: 991px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .product-gallery {
        max-width: 580px;
        margin-inline: auto;
        width: 100%;
    }

    .product-insights__grid {
        grid-template-columns: 1fr;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 767px) {
    .product-details-section {
        padding: 110px 0 52px;
    }

    .product-breadcrumbs {
        margin-bottom: 20px;
        font-size: 12px;
    }

    .product-gallery__thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .product-summary h1 {
        font-size: 24px;
    }

    .product-summary__price strong {
        font-size: 25px;
    }

    .product-purchase__actions {
        gap: 8px;
    }

    .product-quantity {
        flex: 0 0 102px;
        height: 44px;
        min-height: 44px;
    }

    .product-quantity button {
        width: 30px;
        font-size: 16px;
    }

    .product-add-button {
        height: 44px;
        min-height: 44px;
        font-size: 13px;
        padding-inline: 12px;
    }

    .product-wishlist-button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .product-insights-section,
    .related-products-section {
        padding: 48px 0;
    }

    .product-description-card {
        flex-direction: column;
        padding: 20px;
        gap: 12px;
    }

    .product-reviews-summary {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 20px;
    }

    .product-reviews-panel__heading {
        padding: 16px 20px 10px;
    }

    .product-reviews-list {
        padding: 14px 20px 18px;
    }

    .related-products-grid {
        gap: 14px 8px;
    }
}

@media (max-width: 480px) {
    .product-details-section {
        padding: 98px 0 44px;
    }

    .product-purchase__actions {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr) 44px;
        gap: 6px;
    }

    .product-quantity {
        width: 100%;
        flex: auto;
    }

    .product-add-button {
        padding-inline: 8px;
        font-size: 12px;
        gap: 5px;
    }

    .product-add-button svg {
        width: 15px;
        height: 15px;
    }
}
