/* =============================================================================
   Goldone Product Element – Frontend Styles
   ============================================================================= */

/* Block wrapper */
.gpe-block {
    --gpe-columns: 3;
    --gpe-accent: #c0392b;
    --gpe-text:   #2c3e50;
    --gpe-muted:  #7f8c8d;
    --gpe-bg:     #ffffff;
    --gpe-radius: 12px;
    --gpe-gap:    20px;
    font-family: inherit;
    box-sizing: border-box;
}

.gpe-block * { box-sizing: border-box; }

/* Title */
.gpe-block-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var( --gpe-text );
    margin: 0 0 28px;
    position: relative;
}
.gpe-block-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var( --gpe-accent );
    border-radius: 2px;
    margin: 10px auto 0;
}

/* Empty state */
.gpe-empty {
    text-align: center;
    color: var( --gpe-muted );
    padding: 40px;
    border: 2px dashed #ddd;
    border-radius: var( --gpe-radius );
}

/* Items wrap – GRID */
.gpe-items-wrap.gpe-style-grid {
    display: grid;
    grid-template-columns: repeat( var( --gpe-columns ), 1fr );
    gap: var( --gpe-gap );
}

/* Items wrap – LIST */
.gpe-items-wrap.gpe-style-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---- Card base ---- */
.gpe-item-card {
    background: var( --gpe-bg );
    border-radius: var( --gpe-radius );
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.gpe-item-card:hover {
    transform: translateY( -4px );
}

/* Shadow card */
.gpe-card-shadow .gpe-item-card {
    box-shadow: 0 2px 12px rgba( 0,0,0,.08 );
}
.gpe-card-shadow .gpe-item-card:hover {
    box-shadow: 0 8px 28px rgba( 0,0,0,.15 );
}

/* Border card */
.gpe-card-border .gpe-item-card {
    border: 1px solid #e8ecef;
}
.gpe-card-border .gpe-item-card:hover {
    border-color: var( --gpe-accent );
}

/* Flat card */
.gpe-card-flat .gpe-item-card {
    background: #f8f9fa;
}

/* ---- Image ---- */
.gpe-item-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 66%;
    overflow: hidden;
    background: #f0f0f0;
}

.gpe-style-list .gpe-item-image-wrap {
    width: 140px;
    min-width: 140px;
    padding-top: 0;
    height: 110px;
}
.gpe-style-list .gpe-item-card {
    display: flex;
    align-items: stretch;
}

.gpe-item-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.gpe-style-list .gpe-item-image {
    position: relative;
    width: 100%; height: 100%;
}

.gpe-item-card:hover .gpe-item-image {
    transform: scale( 1.05 );
}

.gpe-item-no-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #bbb;
    background: #f5f5f5;
}
.gpe-style-list .gpe-item-no-image {
    position: static;
    width: 140px;
    height: 110px;
}

/* ---- Content ---- */
.gpe-item-content {
    padding: 14px 16px 16px;
    flex: 1;
}

.gpe-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var( --gpe-text );
    margin: 0 0 4px;
    line-height: 1.4;
}

.gpe-item-name-en {
    font-size: .8rem;
    color: var( --gpe-muted );
    font-style: italic;
    margin: 0 0 8px;
}

.gpe-item-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var( --gpe-accent );
    margin: 8px 0 0;
    display: inline-block;
    padding: 2px 10px;
    background: rgba( 192, 57, 43, .08 );
    border-radius: 20px;
}

/* =============================================================================
   SLIDER
   ============================================================================= */

/* Wrapper with hidden overflow for arrows to sit on edge */
.gpe-style-slider .gpe-slider-container {
    position: relative;
    padding: 0 44px;
}

/* The scrollable track */
.gpe-style-slider .gpe-slider-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 4px 18px;
}
.gpe-style-slider .gpe-slider-track::-webkit-scrollbar { display: none; }

/* Each card in slider */
.gpe-style-slider .gpe-item-card {
    min-width: 220px;
    max-width: 260px;
    width: calc( ( 100% - 18px * 2 ) / 3 );
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Arrow buttons */
.gpe-slider-btn {
    position: absolute;
    top: calc( 50% - 12px );
    transform: translateY( -50% );
    z-index: 10;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 10px rgba( 0,0,0,.12 );
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    transition: background .15s, box-shadow .15s, opacity .15s;
    padding: 0;
}
.gpe-slider-btn:hover      { background: #f0f6fc; box-shadow: 0 4px 18px rgba( 0,0,0,.18 ); }
.gpe-slider-btn.gpe-hidden { opacity: .25; pointer-events: none; }
.gpe-slider-prev { left: 0; }
.gpe-slider-next { right: 0; }

/* Responsive */
@media ( max-width: 900px ) {
    .gpe-style-slider .gpe-item-card {
        width: calc( ( 100% - 18px ) / 2 );
    }
    .gpe-style-slider .gpe-slider-container { padding: 0 36px; }
}
@media ( max-width: 480px ) {
    .gpe-style-slider .gpe-item-card { width: 80vw; }
    .gpe-style-slider .gpe-slider-container { padding: 0 28px; }
}

/* =============================================================================
   SINGLE-ITEM (used by [goldone_item] shortcode)
   ============================================================================= */

.gpe-single-item { max-width: 320px; }

/* ---- Responsive ---- */
@media ( max-width: 992px ) {
    .gpe-items-wrap.gpe-style-grid {
        grid-template-columns: repeat( min( var( --gpe-columns ), 3 ), 1fr );
    }
}
@media ( max-width: 600px ) {
    .gpe-items-wrap.gpe-style-grid {
        grid-template-columns: repeat( 2, 1fr );
        gap: 12px;
    }
    .gpe-style-list .gpe-item-image-wrap {
        width: 90px;
        min-width: 90px;
        height: 80px;
    }
    .gpe-item-content { padding: 10px 12px; }
    .gpe-item-name    { font-size: .9rem; }
    .gpe-item-price   { font-size: .9rem; }
}
@media ( max-width: 400px ) {
    .gpe-items-wrap.gpe-style-grid { grid-template-columns: 1fr; }
}
