.pg-carousel-wrapper {
    position: relative;
    width: 100%;
    --pg-accent: #000000;
    --pg-text: #333333;
}

.pg-swiper {
    padding-bottom: 45px !important;
}

/* Grid Layout Mode */
.pg-grid-layout {
    display: grid;
    gap: 30px;
    width: 100%;
}
.pg-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.pg-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1024px) {
    .pg-grid-layout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
    .pg-grid-layout { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}

/* Pagination for Grid Mode */
.pg-grid-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pg-grid-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #eae1d4;
    color: var(--pg-text);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 4px;
}
.pg-grid-pagination .page-numbers.current,
.pg-grid-pagination .page-numbers:hover {
    background-color: var(--pg-accent);
    color: #fff !important;
    border-color: var(--pg-accent);
}

.pg-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

.pg-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.pg-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.pg-primary-img, .pg-secondary-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pg-secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Swap opacity strictly when hover image class exists to prevent white hoverout */
.pg-product-card.has-hover-image:hover .pg-secondary-img {
    opacity: 1;
}
.pg-product-card.has-hover-image:hover .pg-primary-img {
    opacity: 0;
}

.pg-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    color: #fff;
    background-color: var(--pg-accent);
}

.pg-product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pg-categories-wrap {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-title a {
    color: var(--pg-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-price {
    font-size: 15px;
    font-weight: bold;
    color: var(--pg-accent);
    margin-bottom: 15px;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background-color: var(--pg-accent);
    color: #fff;
}

.pg-btn-whatsapp {
    background-color: #25D366 !important;
    color: #fff !important;
}

.pg-btn-whatsapp:hover {
    opacity: 0.9;
}

/* PRESET A: Sharp / Minimal Tech */
.preset_a .pg-product-card {
    border: 1px solid #E5E5E5;
    border-radius: 0px;
}
.preset_a .pg-image-container {
    border-radius: 0px;
}
.preset_a .pg-sale-badge {
    border-radius: 0px;
}
.preset_a .pg-btn {
    width: 100%;
    border-radius: 0px;
}
.preset_a .pg-btn:hover {
    background-color: #fff;
    color: var(--pg-accent);
    border: 1px solid var(--pg-accent);
}

/* PRESET B: Curved / Modern Soft */
.preset_b .pg-product-card {
    border-radius: 16px;
    background: #fff;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.06);
    border: none;
    overflow: hidden;
}
.preset_b .pg-image-container {
    border-radius: 12px;
    margin: 8px;
    overflow: hidden;
    aspect-ratio: 1.1 / 1;
}
.preset_b .pg-sale-badge {
    border-radius: 20px;
    background: var(--pg-accent);
    padding: 5px 12px;
}
.preset_b .pg-btn {
    border-radius: 25px;
    padding: 10px 20px;
}

/* PRESET C: Glassmorphism / Futuristic */
.preset_c .pg-product-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}
.preset_c .pg-product-card:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* PRESET D: Multi-Faceted / Architectural */
.preset_d .pg-product-card {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    background: #111;
    color: #fff;
    border: 1px solid #333;
}
.preset_d .product-title a {
    color: #fff;
}
.preset_d .pg-btn {
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.preset_d .product-price {
    font-family: monospace;
    font-weight: 700;
}

/* PRESET E: Luxury / Premium Elegance */
.preset_e .pg-product-card {
    background: #ffffff;
    border: 1px solid #eae1d4;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    padding: 10px;
}
.preset_e .pg-product-card::before {
    content: '';
    position: absolute;
    top: 5px; right: 5px; bottom: 5px; left: 5px;
    border: 1px solid #d4c19c;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.preset_e .pg-product-card:hover::before {
    opacity: 1;
}
.preset_e .pg-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(212, 193, 156, 0.2);
}
.preset_e .product-title {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 15px;
    text-align: center;
}
.preset_e .product-price {
    color: #bfa15f;
    text-align: center;
    letter-spacing: 1px;
}
.preset_e .pg-categories-wrap {
    text-align: center;
    color: #c4b59f;
    letter-spacing: 2px;
}
.preset_e .pg-btn {
    background: transparent;
    border: 1px solid #bfa15f;
    color: #bfa15f;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}
.preset_e .pg-btn:hover {
    background: #bfa15f;
    color: #fff;
}
