/**
 * GymGo Product Bundles - Frontend CSS
 */

/* Csomag termékek wrapper */
.ggpb-bundled-products {
    margin: 20px 0;
    padding: 15px;
    background: var(--gymgo-gray-50, #f9f9f9);
    border-radius: var(--gymgo-radius-md, 12px);
    border: 1px solid var(--gymgo-gray-200, #e1e1e1);
}

/* Lista elrendezés */
.ggpb-layout-list .ggpb-bundled-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    gap: 15px;
}

.ggpb-layout-list .ggpb-bundled-item:last-child {
    border-bottom: none;
}

/* Rács elrendezés */
.ggpb-layout-grid-2,
.ggpb-layout-grid-3,
.ggpb-layout-grid-4 {
    display: grid;
    gap: 15px;
}

.ggpb-layout-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ggpb-layout-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ggpb-layout-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ggpb-layout-grid-2 .ggpb-bundled-item,
.ggpb-layout-grid-3 .ggpb-bundled-item,
.ggpb-layout-grid-4 .ggpb-bundled-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: var(--gymgo-white, #fff);
    border-radius: var(--gymgo-radius-sm, 8px);
    border: 1px solid var(--gymgo-gray-200, #e1e1e1);
}

/* Termék bélyegkép */
.ggpb-item-thumb {
    flex-shrink: 0;
}

.ggpb-item-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.ggpb-layout-grid-2 .ggpb-item-thumb img,
.ggpb-layout-grid-3 .ggpb-item-thumb img,
.ggpb-layout-grid-4 .ggpb-item-thumb img {
    width: 100%;
    height: auto;
}

/* Termék info */
.ggpb-item-info {
    flex: 1;
    min-width: 0;
}

.ggpb-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.ggpb-item-name a {
    color: #333;
    text-decoration: none;
}

.ggpb-item-name a:hover {
    color: #0073aa;
}

.ggpb-item-qty-label {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

/* Variáció választó */
.ggpb-item-variations {
    margin-top: 10px;
}

.ggpb-variation-selector {
    margin-bottom: 8px;
}

.ggpb-variation-selector label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.ggpb-variation-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Mennyiség választó */
.ggpb-item-qty-wrapper {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 5px;
}

.ggpb-item-qty {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ggpb-qty-minus,
.ggpb-qty-plus {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    user-select: none;
    transition: all 0.2s;
}

.ggpb-qty-minus:hover,
.ggpb-qty-plus:hover {
    background: #e5e5e5;
    color: #333;
}

/* Termék ár */
.ggpb-item-price {
    flex-shrink: 0;
    font-weight: 600;
    color: #0073aa;
}

/* Összesítő */
.ggpb-total-wrapper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ggpb-total-label {
    font-weight: 600;
    font-size: 16px;
}

.ggpb-total-price {
    font-weight: 700;
    font-size: 20px;
    color: #0073aa;
}

/* Választható termék */
.ggpb-optional {
    opacity: 0.8;
}

.ggpb-optional.ggpb-selected {
    opacity: 1;
    background: #e8f4ff;
    border-color: #0073aa;
}

/* Változó termék */
.ggpb-variable.ggpb-incomplete {
    border-color: #f0ad4e;
}

/* Megtakarítás */
.ggpb-saved {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    color: #27ae60;
    font-weight: normal;
}

/* Kosár elemek */
.ggpb-cart-child {
    background: #fafafa !important;
}

.ggpb-cart-child td {
    padding-left: 30px !important;
}

.ggpb-cart-child .product-name::before {
    content: "↳ ";
    color: #999;
}

/* Reszponzív */
@media (max-width: 768px) {
    .ggpb-layout-grid-3,
    .ggpb-layout-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ggpb-layout-list .ggpb-bundled-item {
        flex-wrap: wrap;
    }

    .ggpb-item-price {
        width: 100%;
        text-align: right;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .ggpb-layout-grid-2,
    .ggpb-layout-grid-3,
    .ggpb-layout-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Bundle "Kosárba" gomb — csak layout
   Megjelenés: gymgo-theme.css 3/A "Nagy CTA gomb" szabály
   ========================================================================== */
.ggpb-add-to-cart {
    /* Layout - Átvéve a gymgo-theme.css */
    /* A korábbi overrides törölve, hogy a globális stílus érvényesüljön */

    /* CTA megjelenés (gymgo-theme.css tokenek fallback) */
    background: var(--gymgo-cta-bg, #fcee0a) !important;
    color: var(--gymgo-cta-color, #000) !important;
    border: var(--gymgo-cta-border, 2px solid #000) !important;
    border-radius: var(--gymgo-cta-radius, 8px) !important;
    font-family: var(--gymgo-cta-font, 'Bebas Neue', sans-serif) !important;
    font-weight: var(--gymgo-cta-weight, 400) !important;
    text-transform: var(--gymgo-cta-transform, uppercase) !important;
    cursor: pointer !important;
    transition: var(--gymgo-cta-transition, all 0.3s ease) !important;
    text-align: center !important;
}

/* Bundle quantity +/- buttons: no inner corner rounding */
.ggpb-qty-wrapper .ggpb-qty-btn {
    border-radius: 0 !important;
}

.ggpb-qty-wrapper .ggpb-qty-minus {
    border-radius: var(--gymgo-radius-sm, 8px) 0 0 var(--gymgo-radius-sm, 8px) !important;
}

.ggpb-qty-wrapper .ggpb-qty-plus {
    border-radius: 0 var(--gymgo-radius-sm, 8px) var(--gymgo-radius-sm, 8px) 0 !important;
}

.ggpb-bundle-actions .quantity .minus {
    border-radius: var(--gymgo-radius-sm, 8px) 0 0 var(--gymgo-radius-sm, 8px) !important;
}

.ggpb-bundle-actions .quantity .plus {
    border-radius: 0 var(--gymgo-radius-sm, 8px) var(--gymgo-radius-sm, 8px) 0 !important;
}
