/* ============================================================
   PRODUCT PAGE
   ============================================================ */

/* HERO */

.product-page__hero {
    padding: 32px 0 56px;
}

.product-page__inner {
    display: flex;
    gap: 48px;
    align-items: start;
}

.product-bread {
    margin: 40px 0;
}

/* ============================================================
   GALLERY
   ============================================================ */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(50% - 24px);
}

.product-gallery__main-wrap {
    position: relative;
    padding: 0 24px;
}

.product-gallery__main .swiper-slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.product-gallery__prev,
.product-gallery__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid var(--primary);
    border-radius: 3px;
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.product-gallery__prev:hover,
.product-gallery__next:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.product-gallery__prev.swiper-button-disabled,
.product-gallery__next.swiper-button-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.product-gallery__prev {
    left: 0;
}

.product-gallery__next {
    right: 0;
}

.product-gallery__thumbs {
    padding: 0 24px;
    width: 100%;
}

.product-gallery__thumbs .swiper-slide {
    width: auto;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.product-gallery__thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.product-gallery__thumbs .swiper-slide img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    width: 100%;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.product-gallery__thumbs .swiper-slide-thumb-active img {
    border-color: var(--primary);
}

/* ============================================================
   PRODUCT INFO
   ============================================================ */

.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
    width: calc(50% - 24px);
}

.product-info__title {
    color: var(--graphite-dark);
    line-height: 1.1;
    margin: 0;
}

.product-info__desc {
    color: var(--graphite-medium);
    line-height: 1.6;
    margin: 0;
}

/* Meta grid */

.product-info__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.product-info__meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-info__meta-label {
    color: var(--text-muted);
}

.product-info__meta-value {
    color: var(--graphite-dark);
}

.product-info__meta-value a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.product-info__meta-value a:hover {
    color: var(--primary-hover);
}

.product-info__cta {
    align-self: flex-start;
    max-width: 280px;
    width: 100%;
}

/* ============================================================
   TABS
   ============================================================ */

.product-tabs {
    padding: 0 0 64px;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.product-tabs .container {
    padding-top: 48px;
}

.product-tabs__nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 4px;
}

.product-tabs__tab {
    padding: 10px 24px;
    border: 1px solid var(--border);
    border-bottom: none;
    background: var(--white);
    color: var(--graphite-medium);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
    font-size: inherit;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.product-tabs__tab:hover {
    color: var(--primary);
    border-color: var(--soft-border);
}

.product-tabs__tab.is-active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.product-tabs__panel {
    display: none;
}

.product-tabs__panel.is-active {
    display: block;
}

.product-tabs__panel-heading {
    margin: 0 0 20px;
    color: var(--graphite-dark);
}

.product-tabs__rich-text {
    max-width: 720px;
    color: var(--graphite);
    line-height: 1.7;
}

.product-tabs__rich-text p {
    margin-bottom: 16px;
}

.product-tabs__rich-text p:last-child {
    margin-bottom: 0;
}

.product-tabs__rich-text ul,
.product-tabs__rich-text ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.product-tabs__rich-text li {
    margin-bottom: 6px;
}

/* Attributes table */

.product-attrs-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 640px;
}

.product-attrs-table tr {
    border-bottom: 1px solid var(--border);
}

.product-attrs-table tr:last-child {
    border-bottom: none;
}

.product-attrs-table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 400;
    width: 40%;
    vertical-align: top;
}

.product-attrs-table td {
    padding: 12px 16px;
    color: var(--graphite-dark);
    vertical-align: top;
}

.product-attrs-table td a {
    color: var(--primary);
    text-decoration: none;
}

.product-attrs-table td a:hover {
    color: var(--primary-hover);
}

/* ============================================================
   PRODUCT CALLBACK
   ============================================================ */

.product-cb {
    overflow: hidden;
    position: relative;
}

.product-cb__inner {
    display: flex;
    position: relative;
    justify-content: flex-end;
    z-index: 2;
}

.product-cb__image {
    background-size: cover;
    background-position: center;
    background-color: var(--graphite-pale);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.product-cb__form-col {
    display: flex;
    align-items: center;
    padding: 48px 0;
    max-width: 692px;
    width: 100%;
}

.product-cb__form-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-cb__title {
    color: var(--graphite-dark);
    line-height: 1.15;
    margin: 0;
}

.product-cb__desc {
    color: var(--graphite-medium);
    line-height: 1.6;
    margin: 0;
}

.product-cb__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-cb__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-cb__input {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--white);
    color: var(--graphite-dark);
    font-size: inherit;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.product-cb__input:focus {
    border-color: var(--primary);
}

.product-cb__input::placeholder {
    color: var(--text-muted);
}

.product-cb__textarea {
    resize: vertical;
    min-height: 80px;
}

.product-cb__privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
}

.product-cb__privacy input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
}

.product-cb__privacy a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.product-cb__privacy a:hover {
    color: var(--primary-hover);
}

.product-cb__submit {
    width: 100%;
    justify-content: center;
}

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

@media (max-width: 1200px) {
    .product-cb__form-col {
        padding: 48px 40px;
    }
}

@media (max-width: 1080px) {
    .product-page__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .product-bread {
        margin: 100px 0 0;
    }
}

@media (max-width: 768px) {
    .product-page__hero {
        padding: 60px 0 40px;
    }

    .product-page__inner {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .product-gallery {
        width: 100%;
    }

    .product-info {
        order: -1;
        position: static;
        width: 100%;
    }

    .product-info__meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .product-tabs {
        padding-bottom: 48px;
    }

    .product-tabs .container {
        padding-top: 32px;
    }

    .product-tabs__nav {
        flex-direction: column;
    }

    .product-tabs__tab {
        padding: 8px 16px;
        border-radius: 8px;
    }

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

    .product-cb__image {
        display: none;
    }

    .product-cb__form-col {
        padding: 40px 0;
    }

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

    .product-info__cta {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-gallery__prev,
    .product-gallery__next {
        width: 32px;
        height: 32px;
    }

    .product-gallery__main-wrap,
    .product-gallery__thumbs {
        padding: 0 20px;
    }
}
