/**
 * Product Carousel for Elementor - Frontend Styles
 */

.pce-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.pce-wrapper *,
.pce-wrapper *::before,
.pce-wrapper *::after {
    box-sizing: border-box;
}

.pce-swiper {
    overflow: hidden;
    width: 100%;
}

.pce-wrapper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* ==========================
   ITEM
   ========================== */
.pce-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* ==========================
   IMAGE WRAP & ASPECT RATIOS
   ========================== */
.pce-image-link {
    display: block;
    text-decoration: none;
    width: 100%;
}

.pce-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.pce-ar-1-1   { aspect-ratio: 1 / 1; }
.pce-ar-4-3   { aspect-ratio: 4 / 3; }
.pce-ar-3-2   { aspect-ratio: 3 / 2; }
.pce-ar-16-9  { aspect-ratio: 16 / 9; }
.pce-ar-3-4   { aspect-ratio: 3 / 4; }
.pce-ar-2-3   { aspect-ratio: 2 / 3; }
.pce-ar-9-16  { aspect-ratio: 9 / 16; }

@supports not (aspect-ratio: 1 / 1) {
    .pce-ar-1-1::before  { content: ""; display: block; padding-top: 100%; }
    .pce-ar-4-3::before  { content: ""; display: block; padding-top: 75%; }
    .pce-ar-3-2::before  { content: ""; display: block; padding-top: 66.67%; }
    .pce-ar-16-9::before { content: ""; display: block; padding-top: 56.25%; }
    .pce-ar-3-4::before  { content: ""; display: block; padding-top: 133.33%; }
    .pce-ar-2-3::before  { content: ""; display: block; padding-top: 150%; }
    .pce-ar-9-16::before { content: ""; display: block; padding-top: 177.78%; }
    .pce-image-wrap[class*="pce-ar-"] .pce-image {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.pce-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: block;
}

.pce-image-default {
    opacity: 1;
    z-index: 1;
}

.pce-image-hover {
    opacity: 0;
    z-index: 2;
}

.pce-item:hover .pce-image-default {
    opacity: 0;
}

.pce-item:hover .pce-image-hover {
    opacity: 1;
}

/* ==========================
   CONTENT
   ========================== */
.pce-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: left;
}

.pce-title {
    margin: 0 0 12px 0;
    font-weight: 400;
    line-height: 1.2;
}

.pce-description {
    margin: 0 0 24px 0;
    line-height: 1.5;
    white-space: pre-line;
}

/* ==========================
   BUTTON
   ========================== */
.pce-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: fit-content;
    align-self: flex-start;
}

.pce-content[style*="text-align: center"] .pce-button {
    align-self: center;
}

.pce-content[style*="text-align: right"] .pce-button {
    align-self: flex-end;
}

.pce-button .pce-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* ==========================
   NAVIGATION ARROWS - BASE
   ========================== */
.pce-nav-button {
    /* Critical: enforce flex-shrink:0 so width/height never collapse */
    position: absolute;
    top: 50%;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    /* Base size — overridden by Elementor selectors */
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;

    background-color: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-50%);
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

/* Override min-width/min-height when user customizes — let Elementor's width/height win */
.pce-wrapper .pce-nav-button {
    min-width: 0;
    min-height: 0;
}

.pce-nav-button svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.pce-nav-button i {
    font-size: 18px;
    line-height: 1;
}

.pce-nav-button.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pce-nav-button.swiper-button-lock {
    display: none;
}

/* ==========================
   NAVIGATION SHAPES
   These take priority over custom border-radius
   ========================== */

/* Circle — force 50% radius. User should set Width = Height for perfect circle. */
.pce-shape-circle .pce-nav-button {
    border-radius: 50% !important;
}

/* Square — sharp corners */
.pce-shape-square .pce-nav-button {
    border-radius: 0 !important;
}

/* Rounded — 8px corners */
.pce-shape-rounded .pce-nav-button {
    border-radius: 8px !important;
}

/* Pill — fully pill-shaped */
.pce-shape-pill .pce-nav-button {
    border-radius: 999px !important;
}

/* Custom — user-defined via Border Radius control (no shape class override) */

/* ==========================
   NAVIGATION POSITIONS
   ========================== */
.pce-nav-outside .pce-nav-prev { left: -22px; }
.pce-nav-outside .pce-nav-next { right: -22px; }
.pce-nav-inside  .pce-nav-prev { left: 16px; }
.pce-nav-inside  .pce-nav-next { right: 16px; }

.pce-nav-top {
    display: flex;
    flex-direction: column;
}

.pce-nav-top > .pce-nav-button {
    position: relative;
    top: auto;
    transform: none;
}

.pce-nav-top .pce-nav-prev,
.pce-nav-top .pce-nav-next {
    margin-bottom: 16px;
    align-self: flex-end;
}

.pce-nav-top .pce-nav-prev {
    margin-right: 8px;
}

.pce-nav-bottom .pce-nav-button {
    position: relative;
    top: auto;
    transform: none;
    margin-top: 24px;
    display: inline-flex;
}

.pce-nav-bottom {
    text-align: center;
}

.pce-nav-bottom .pce-nav-prev {
    margin-right: 8px;
}

@media (max-width: 1199px) {
    .pce-nav-outside .pce-nav-prev { left: 8px; }
    .pce-nav-outside .pce-nav-next { right: 8px; }
}

/* ==========================
   PAGINATION
   ========================== */
.pce-pagination {
    position: relative !important;
    bottom: auto !important;
    text-align: center;
    margin-top: 30px;
    width: 100%;
}

.pce-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #cccccc;
    opacity: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.pce-pagination .swiper-pagination-bullet-active {
    background-color: #000000;
    transform: scale(1.2);
}

/* ==========================
   MOBILE
   ========================== */
@media (max-width: 767px) {
    .pce-nav-outside .pce-nav-prev { left: 4px; }
    .pce-nav-outside .pce-nav-next { right: 4px; }

    .pce-hide-nav-mobile .pce-nav-button {
        display: none !important;
    }

    .pce-title {
        font-size: 1.25rem;
    }

    .pce-description {
        font-size: 0.95rem;
    }

    .pce-content {
        padding-top: 16px;
    }

    .pce-button {
        min-height: 44px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* ==========================
   ELEMENTOR EDITOR
   ========================== */
.elementor-editor-active .pce-item {
    pointer-events: auto;
}
