@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* ── Globální tokeny (Elementor → Site Settings → Product Suite → Globální styl) ── */
    --gf-bg:         #FAFAFA;
    --gf-text:       #0E1111;
    --gf-accent:     var(--wp--preset--color--primary, #2271b1);
    --gf-accent-alt: var(--wp--preset--color--secondary, #135e96);
    --gf-muted:      #999;
    --gf-border:     #d0d0d0;
    --gf-radius-lg:  21px;
    --gf-radius-sm:  8px;

    /* ── Karty komponent ── */
    --aecs-card-border: #e0e0e0;
    --aecs-card-radius: 12px;
    --aecs-select-radius: 6px;   /* variation / option dropdowns */

    /* ── Galerie — šipky ── */
    --aecs-gallery-nav-bg:       rgba(0, 0, 0, 0.50);
    --aecs-gallery-nav-bg-hover: rgba(0, 0, 0, 0.70);
    --aecs-gallery-nav-color:    #fff;
    --aecs-gallery-nav-radius:   9999px;

    /* ── Box Koupit v páru / Addons ── */
    --aecs-togglebox-border: var(--gf-accent);
    --aecs-togglebox-bg:     var(--gf-bg);
    --aecs-togglebox-radius: var(--gf-radius-lg);
    --aecs-togglebox-text:   var(--gf-text);

    /* ── Toggle switch ── */
    --aecs-switch-off:   var(--gf-muted);
    --aecs-switch-on:    var(--gf-accent);
    --aecs-switch-knob:  #fff;

    /* ── Tlačítko Přidat do košíku ── */
    --aecs-btn-atc-bg:          var(--gf-accent);
    --aecs-btn-atc-color:       #fff;
    --aecs-btn-atc-bg-hover:    var(--gf-accent-alt);
    --aecs-btn-atc-color-hover: #fff;
    --aecs-btn-atc-radius:      var(--gf-radius-lg);

    /* ── Tlačítko Další krok ── */
    --aecs-btn-next-bg:          var(--gf-accent);
    --aecs-btn-next-color:       #fff;
    --aecs-btn-next-bg-hover:    var(--gf-accent-alt);
    --aecs-btn-next-color-hover: #fff;
    --aecs-btn-next-radius:      var(--gf-radius-sm);

    /* ── Tlačítko Zpět ── */
    --aecs-btn-prev-color:       var(--gf-accent);
    --aecs-btn-prev-bg-hover:    #f0f0f0;
    --aecs-btn-prev-color-hover: var(--gf-accent);
    --aecs-btn-prev-radius:      var(--gf-radius-sm);
}

form.cart.aecs,
.aecs_components_container,
.aecs_component_options_selection_container,
.aecs_component_otpions_thumbnails_container {
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--gf-text);
}

.aecs_components_container h3,
body:not(.search-results) .entry-summary .aecs_components_container h3:first-child {
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--gf-text);
}

form.cart.aecs  {
   display: none;
}

form.cart.aecs.aecs_form_loaded {
    display: block;
}


.aecs_components_container h3,
body:not(.search-results) .entry-summary .aecs_components_container h3:first-child {
    margin-bottom: 10px;
}

.aecs_components_single_item {
    margin-bottom: 10px;
}

.aecs_components_single_item h3 abbr {
    margin-left: 5px;
}

.aecs_components_single_item h3 abbr.required {
    color: var(--gf-accent);
}

.aecs_components_container select.aecs_component_otpions_select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: var(--gf-radius-sm);
    padding: 8px 32px 8px 10px;
    background-color: #fff;
    color: var(--gf-text);
    font-size: 0.95em;
    appearance: auto;
    cursor: pointer;
}
.aecs_components_container select.aecs_component_otpions_select:focus {
    outline: 2px solid var(--gf-accent);
    outline-offset: 1px;
    border-color: var(--gf-accent);
}

.aecs_component_options_list_container .woocommerce-pagination {
    margin-top: 15px;
}

.aecs_component_otpions_thumbnails_container ul.products li {
    clear: both;
    display: inline-block;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gf-border);
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: var(--gf-radius-lg);
    background: var(--gf-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.aecs_component_otpions_thumbnails_container ul.products li:last-child {
    margin-bottom: 0;
}

.aecs_component_otpions_thumbnails_container ul.products li:hover,
.aecs_component_options_selection_container {
    box-shadow: 0px 0px 2px 2px rgba( 34, 113, 177, 0.15 );
    box-shadow: 0px 0px 2px 2px color-mix(in srgb, var(--gf-accent) 15%, transparent);
}

.aecs_component_otpions_thumbnails_container .aecs_image_container,
.aecs_component_otpions_thumbnails_container .aecs_product_info,
.aecs_component_options_selection_container .aecs_image_container,
.aecs_component_options_selection_container .aecs_product_info {
   float: left;
}

.aecs_component_otpions_thumbnails_container .aecs_image_container,
.aecs_component_options_selection_container .aecs_image_container,
.woocommerce #content div.product div.images.aecs_image_container,
.woocommerce div.product div.aecs_image_container.images,
.woocommerce-page #content div.product div.aecs_image_container.images,
.woocommerce-page div.product div.aecs_image_container.images,
#content .twentysixteen div.product div.aecs_image_container.images {
    width: 80px;
    margin-bottom: 5px;
    display: inline-block;
    float: left;
}

.aecs_component_otpions_thumbnails_container .aecs_product_info,
.aecs_component_options_selection_container .aecs_product_info {
    padding-left: 10px;
}

.aecs_component_otpions_thumbnails_container ul.products,
body:not(.search-results) .entry-summary .aecs_component_otpions_thumbnails_container ul {

    margin-bottom: 0;

}

.aecs_component_options_radio_input_container input,
.aecs_component_options_radio_input_container > label {
    cursor: pointer;
}

.aecs_components_container a,
.aecs_components_container .button,
.aecs_components_container button {
    color: var(--gf-accent);
}

.aecs_components_container .button,
.aecs_components_container button {
    border-color: var(--gf-accent);
    border-radius: var(--gf-radius-sm);
    background: var(--gf-bg);
}

/* selection */

.aecs_component_options_selection_container {
    width: 100%;
    padding: 14px;
    display: none;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-lg);
    background: var(--gf-bg);
}

/* Stack the variations table: label on top, full-width select below.
   Two-column layout leaves selects too narrow inside compact cards. */
.aecs_component_options_selection_container .variations,
.woocommerce div.product form.cart .aecs_component_options_selection_container .variations {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0;
}

.aecs_component_options_selection_container .variations tbody {
    display: block !important;
    width: 100% !important;
}

.aecs_component_options_selection_container .variations tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    background: transparent !important;
}

.aecs_component_options_selection_container .variations tr:last-child {
    margin-bottom: 0 !important;
}

.aecs_component_options_selection_container .variations td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
    background: transparent !important;
}

.aecs_component_options_selection_container .variations td.label {
    font-size: 0.78em !important;
    font-weight: 700 !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 5px !important;
    text-align: left !important;
}

.aecs_component_options_selection_container .variations td.label label {
    margin: 0 !important;
}

.aecs_component_options_selection_container .variations td.value {
    width: 100% !important;
}

.aecs_component_options_selection_container .variations td.value select {
    width: 100% !important;
    min-height: 38px !important;
    border: 1px solid #ccc !important;
    border-radius: var(--aecs-select-radius) !important;
    padding: 7px 32px 7px 10px !important;
    font-size: 0.9em !important;
    background-color: #fff !important;
    cursor: pointer !important;
    appearance: auto !important;
    color: var(--gf-text) !important;
}

.aecs_component_options_selection_container .variations td.value select:focus {
    outline: 2px solid var(--gf-accent) !important;
    outline-offset: 1px !important;
    border-color: var(--gf-accent) !important;
}

.aecs_component_options_selection_container .woocommerce-variation-price {
    display: none !important;
}

.aecs_component_options_list_container,
.aecs_selection_opened .aecs_selection_open,
.aecs_selection_selected .aecs_selection_open,
.aecs_selection_close,
a.aecs_selection_clear,
.aecs_components_single_item_dependence_selected.aecs_selection_selected a.aecs_selection_clear {
    display: none;
}

.aecs_selection_opened .aecs_component_options_list_container {

    display: block;

}

.aecs_selection_opened .aecs_selection_close,
.aecs_selection_selected .aecs_component_options_selection_container {

    display: inline-block;

}

.aecs_selection_selected a.aecs_selection_clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    text-decoration: none;
    box-shadow: none;
    border-radius: 20px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    background-image: none;
}
a.aecs_selection_clear::before {
    content: '×';
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
}
a.aecs_selection_clear:hover {
    background: #e8e8e8;
    border-color: #999;
    color: #333;
}

.aecs_component_subtotal {
    float: right;
    display: none;
}

.woocommerce div.product form.cart .aecs_component_options_selection_container div.quantity,
.woocommerce div.product form.cart .aecs_component_options_selection_container a.reset_variations {
    float: none;
    margin-top: 8px;
}

.aecs_product_disabled{
    pointer-events:none;
    opacity:0.4;
}

/* quick view */

.aecs_product_link .yith-wcqv-button {

    display: inline-block;

}

.aecs_product_link .yith-wcqv-button > span {

    padding: 5px;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;

}

.aecs_customer_advice_component_list {
    margin-left: 10px;
    text-decoration: underline;
}

/* Acccordion style */

.aecs_accordion .aecs_components_single_item {
    margin-bottom: 15px;
}

.aecs_accordion a.aecs_selection_open,
.aecs_accordion a.aecs_selection_close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gf-accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    color: var(--gf-accent);
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
}
.aecs_accordion a.aecs_selection_open:hover,
.aecs_accordion a.aecs_selection_close:hover {
    background: var(--gf-accent);
    color: #fff;
}

/* Replace the PNG images with CSS chevrons */
.aecs_accordion a.aecs_selection_open img,
.aecs_accordion a.aecs_selection_close img {
    display: none;
}
.aecs_accordion a.aecs_selection_open::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.aecs_accordion a.aecs_selection_close::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-135deg) translateY(-2px);
}

.aecs_accordion div:not(.aecs_selection_selected).aecs_components_single_item > h3 {
    cursor: pointer;
}

.aecs_accordion .aecs_component_description {
    display: none;
}

.aecs_accordion .aecs_selection_opened .aecs_component_description {
    display: block;
}

/* listed & step style */

.aecs_list .aecs_component_options_list_container,
.aecs_step .aecs_component_options_list_container {

    display: block;

}

.aecs_list .aecs_selection_open,
.aecs_list .aecs_selection_close,
.aecs_list .aecs_selection_selected .aecs_component_options_list_container,
.aecs_step .aecs_selection_open,
.aecs_step .aecs_selection_close,
.aecs_step .aecs_selection_selected .aecs_component_options_list_container {
    display: none;
}

.aecs_step .aecs_components_single_item {
   display: none;
}

.aecs_step .aecs_components_single_item.aecs_current_step_item {
    display: block;
}

.aecs_step_navigation {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aecs_step_prev,
.aecs_step_next {
    float: none;
}

.aecs_step_next a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--aecs-btn-next-bg);
    border-radius: var(--aecs-btn-next-radius);
    background: var(--aecs-btn-next-bg);
    color: var(--aecs-btn-next-color);
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.aecs_step_next a:hover {
    background: var(--aecs-btn-next-bg-hover);
    border-color: var(--aecs-btn-next-bg-hover);
    color: var(--aecs-btn-next-color-hover);
}

.aecs_step_prev a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--aecs-btn-prev-color);
    border-radius: var(--aecs-btn-prev-radius);
    background: transparent;
    color: var(--aecs-btn-prev-color);
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.aecs_step_prev a:hover {
    background: var(--aecs-btn-prev-bg-hover);
    color: var(--aecs-btn-prev-color-hover);
    border-color: var(--aecs-btn-prev-color-hover);
}

/* Prev arrow icon */
.aecs_step_prev a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* Next arrow icon */
.aecs_step_next a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.aecs_step_current_info {
    display: inline-block;
    font-size: 0.85em;
    color: #666;
    text-align: center;
    flex: 1;
}

.aecs_step_first .aecs_step_prev,
.aecs_step_last .aecs_step_next {
    visibility: hidden;
}

.aecs_customer_advice {
    margin-bottom: 10px;
}

.aecs_step .aecs_components_required_blocked, .aecs_customer_advice {
    padding: 10px;
    border: 2px solid var(--gf-accent);
}

.aecs_customer_advice > p,body:not(.search-results) .entry-summary .aecs_customer_advice p {
    padding: 0;
    margin: 0;
}

.aecs_step_current_info {
    display: inline-block;
}

.aecs_clear {
    clear: both;
}

/* total */

.aecs_wcp_group_total table td {
    text-align: right;
    padding-right: 5px;
}

/* dependence */

.aecs_components_single_item_depenence_hided {
    display: none;
}

/* cart */

/* Composite parent row keeps the theme's normal bottom border now that its
   components render inside the row (breakdown card) instead of as separate
   child rows below it. */

/* Composite components are now shown ONCE, inside the parent row's breakdown
   card (matches the gemfire cart mockup). Hide the redundant per-component
   cart/order line rows so the same info isn't doubled. display:none is purely
   visual — these are still real line items, so cart/order totals are unchanged
   (the parent row already rolls up their subtotal). */
tr.cart_item.aecs_component_child_item,
tr.order_item.aecs_component_child_item {
    display: none;
}

.aecs-dual-mode-box {
    border: 1px solid var(--aecs-togglebox-border);
    padding: 8px 12px;
    /* Breathing room from the configurator above and the add-to-cart button
       below; a touch more at the bottom since the big red ATC button reads close. */
    margin: 20px 0 26px;
    background: var(--aecs-togglebox-bg);
    border-radius: var(--aecs-togglebox-radius);
    color: var(--aecs-togglebox-text);
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.aecs-dual-mode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aecs-dual-mode-text {
    font-weight: 600;
    font-size: 0.85em;
    color: var(--aecs-togglebox-text);
}

.aecs-dual-mode-input {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}

.aecs-dual-mode-switch {
    cursor: pointer;
    text-indent: -9999px;
    width: 44px;
    height: 24px;
    background: var(--aecs-switch-off);
    display: block;
    border-radius: 24px;
    position: relative;
    transition: 0.3s;
    flex: 0 0 auto;
}

.aecs-dual-mode-switch:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--aecs-switch-knob);
    border-radius: 18px;
    transition: 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.aecs-dual-mode-input:checked + .aecs-dual-mode-switch {
    background: var(--aecs-switch-on);
}

.aecs-dual-mode-input:checked + .aecs-dual-mode-switch:after {
    transform: translateX(20px);
}

/* Separator between rows inside the same box */
.aecs-dual-mode-row + .aecs-addon-row,
.aecs-addon-row + .aecs-addon-row {
    border-top: 1px solid rgba(34, 113, 177, 0.15);
    border-top: 1px solid color-mix(in srgb, var(--gf-accent) 15%, transparent);
    margin-top: 7px;
    padding-top: 7px;
}

/* Price shown next to the addon label */
.aecs-addon-price {
    font-weight: normal;
    font-size: 0.9em;
    color: var(--gf-accent);
    margin-left: 4px;
}

tr.cart_item.aecs_component_child_item > td,
tr.order_item.aecs_component_child_item > td {

    border-top: none ;
    border-bottom: none ;

}

tr.order_item.aecs_component_child_item > td .aecs_cart_component_name a {
    float: left;
    margin-right: 5px;
}

tr.cart_item.aecs_component_child_item > td .aecs_cart_component_name,
tr.cart_item.aecs_component_child_item > td.product-name > dl.variation,
tr.order_item.aecs_component_child_item > td .aecs_cart_component_name,
tr.order_item.aecs_component_child_item > td.product-name > dl.variation {

    margin-left: 10px;

}

tr.cart_item.aecs_component_child_item > td .aecs_cart_component_name > label,
tr.order_item.aecs_component_child_item > td .aecs_cart_component_name > label {
    display: block;
    font-weight: bold;
}

/* Composite cart breakdown — component cards on the parent row.
   Matches the gemfire cart mockup: each row is [label · qty · name · attribute
   pills · price]. Reused in cart AND order details (same builder). */
.aecs_cart_breakdown {
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 1px dashed var(--gf-border, rgba(0, 0, 0, 0.12));
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85em;
    line-height: 1.4;
}
.aecs_cart_breakdown_item {
    margin: 0;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    background: var(--gf-bg, #fafafa);
    border-radius: 5px;
    border-left: 2px solid var(--gf-border, #ddd);
}
.aecs_cart_breakdown_item::before { content: none; }   /* drop the old ↳ marker */
.aecs_cart_breakdown_component {
    color: var(--gf-muted, #888);
    font-weight: 400;
    white-space: nowrap;
}
.aecs_cart_breakdown_qty {
    font-weight: 700;
    color: var(--gf-accent, #d63638);
    white-space: nowrap;
}
.aecs_cart_breakdown_product {
    font-weight: 500;
    color: var(--gf-text, #111);
    white-space: nowrap;
}
.aecs_cart_breakdown_attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.aecs_cart_attr_pill {
    background: #fff;
    border: 1px solid var(--gf-border, #e8e8e8);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.92em;
    color: #555;
    white-space: nowrap;
}

/* YITH PRODUCT ADDONS */
#aecs_wcp_tr_wapo_option_total.aecs_wapo_total_hided { display: none; }
div.product-type-aecs-composite .yith_wapo_group_total { display: none !important; }

/* VARIATION SELECTOR inside component selected card — stacked layout */
.aecs_components_single_item .reset_variations { display: none !important; }

.aecs_components_single_item table.variations {
    display: block !important;
    width: 100% !important;
    border-collapse: collapse !important;
    padding-top: 12px !important;
    margin-top: 10px !important;
    border-top: 1px solid #e8e8e8 !important;
}

.aecs_components_single_item table.variations tbody {
    display: block !important;
    width: 100% !important;
}

/* Each row is its own stacked block */
.aecs_components_single_item table.variations tr,
.aecs_components_single_item table.variations tr:nth-child(odd),
.aecs_components_single_item table.variations tr:nth-child(even) {
    display: block !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    background: transparent !important;
}

.aecs_components_single_item table.variations tr:last-child {
    margin-bottom: 0 !important;
}

/* Both cells stack full-width */
.aecs_components_single_item table.variations tr td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    vertical-align: top !important;
    background: transparent !important;
}

.aecs_components_single_item table.variations tr td.label {
    font-size: 0.78em !important;
    font-weight: 700 !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
}

.aecs_components_single_item table.variations tr td.label label {
    margin: 0 !important;
}

.aecs_components_single_item table.variations td.value {
    width: 100% !important;
}

.aecs_components_single_item table.variations td.value select {
    width: 100% !important;
    min-height: 38px !important;
    border: 1px solid #ccc !important;
    border-radius: var(--aecs-select-radius) !important;
    padding: 7px 32px 7px 10px !important;
    font-size: 0.9em !important;
    background-color: #fff !important;
    color: var(--gf-text) !important;
    cursor: pointer !important;
    appearance: auto !important;
}

.aecs_components_single_item table.variations td.value select:focus {
    outline: 2px solid var(--gf-accent) !important;
    outline-offset: 1px !important;
    border-color: var(--gf-accent) !important;
}

.aecs_components_single_item .woocommerce-variation-price {
    font-size: 0.9em !important;
    margin-top: 6px !important;
    color: #333 !important;
}

/* Hide WooCommerce variation forms inside thumbnail product cards.
   Variation selection happens in the selection container when a product is clicked,
   not inside the thumbnail card itself. */
.aecs_component_otpions_thumbnails_container li .variations_form,
.aecs_component_otpions_thumbnails_container li table.variations,
.aecs_component_otpions_thumbnails_container li .single_variation_wrap,
.aecs_component_otpions_thumbnails_container li .woocommerce-variation-add-to-cart { display: none !important; }

/* =====================================================================
   AECS composite form — card layout and totals display
   ===================================================================== */

form.cart.aecs .aecs_components_container.aecs_list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

form.cart.aecs .aecs_components_single_item {
    padding: 16px 12px;
    border-radius: var(--aecs-card-radius);
    border: 1px solid var(--aecs-card-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: transparent !important;
}

form.cart.aecs .aecs_components_single_item > h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 700;
}

form.cart.aecs .aecs_component_otpions_thumbnails_container ul.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
}

form.cart.aecs .aecs_component_otpions_thumbnails_container ul.products > li {
    list-style: none;
    margin: 0 !important;
    padding: 10px;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    background: var(--gf-bg);
}

form.cart.aecs .aecs_image_container img {
    border-radius: 8px;
    display: block;
    width: 100%;
    height: auto;
}

/* Selected product card:
   Row 1 — image (fixed 64px) + product title/price (flex-grow)
   Row 2 — variations table full-width
   flex-wrap:wrap makes the table drop to its own line               */
form.cart.aecs .aecs_component_options_selection_container .aecs_inner_selected_container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

form.cart.aecs .aecs_component_options_selection_container .aecs_image_container {
    flex: 0 0 64px;
    width: 64px !important;
    margin: 0 !important;
}

form.cart.aecs .aecs_component_options_selection_container .aecs_product_info {
    flex: 1 1 0;
    float: none !important;
    min-width: 0;
}

/* Variations table: own full-width row below image+info */
form.cart.aecs .aecs_inner_selected_container table.variations {
    flex: 0 0 100%;
    width: 100% !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e8e8e8 !important;
    border-collapse: collapse !important;
}

/* Quantity and add-to-cart controls also span full width */
form.cart.aecs .aecs_inner_selected_container .woocommerce-variation-add-to-cart,
form.cart.aecs .aecs_inner_selected_container div.quantity {
    flex: 0 0 100%;
    float: none !important;
    margin-top: 8px !important;
}

/* On very narrow screens (≤400 px): stack image above info too */
@media (max-width: 400px) {
    form.cart.aecs .aecs_component_options_selection_container .aecs_inner_selected_container {
        gap: 8px;
    }
    form.cart.aecs .aecs_component_options_selection_container .aecs_image_container {
        flex: 0 0 100%;
        width: 100% !important;
        max-width: 80px;
    }
    form.cart.aecs .aecs_component_options_selection_container .aecs_product_info {
        flex: 0 0 100%;
    }
}

form.cart.aecs .aecs_product_title {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 4px;
    line-height: 1.3;
}

form.cart.aecs .aecs_product_price .amount {
    color: #000 !important;
    font-weight: 700 !important;
}

/* Thumbnail list: prevent long titles from breaking layout */
form.cart.aecs .aecs_component_otpions_thumbnails_container .aecs_product_title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

form.cart.aecs .aecs_component_subtotal,
form.cart.aecs .aecs_wcp_group_total {
    margin-top: 10px;
}

form.cart.aecs .aecs_component_subtotal {
    display: none !important;
}

form.cart.aecs #aecs_wcp_tr_component_total {
    display: none !important;
}

/* Hide "Základní cena produktu" row — price is already in the product title */
form.cart.aecs .aecs_group_option_total_base_price,
form.cart.aecs .aecs_group_option_total_base_price + td,
form.cart.aecs tr:has(.aecs_group_option_total_base_price) {
    display: none !important;
}

form.cart.aecs .aecs_components_single_item h3 .optional {
    display: none !important;
}

form.cart.aecs .aecs_wcp_group_total table {
    width: 100%;
    border-collapse: collapse;
}

form.cart.aecs .aecs_wcp_group_total td {
    padding: 6px 0;
}

form.cart.aecs #aecs_wcp_tr_order_total td {
    padding-top: 10px;
    border-top: 1px solid #e6e6e6;
    font-weight: 700;
    font-size: 1.05em;
}

form.cart.aecs #aecs_wcp_tr_order_total .aecs_group_final_total .amount {
    font-size: 1.15em;
    color: #000;
}

form.cart.aecs #aecs_wcp_tr_wapo_option_total,
form.cart.aecs #aecs_wcp_tr_component_total {
    display: none !important;
}

form.cart.aecs .aecs_wcp_group_total table,
form.cart.aecs .aecs_wcp_group_total tbody,
form.cart.aecs .aecs_wcp_group_total #aecs_wcp_tr_order_total,
form.cart.aecs .aecs_wcp_group_total #aecs_wcp_tr_order_total td {
    display: block !important;
    width: 100%;
}

form.cart.aecs .aecs_wcp_group_total #aecs_wcp_tr_order_total td:first-child {
    display: none !important;
}

form.cart.aecs .aecs_wcp_group_total #aecs_wcp_tr_order_total td:last-child {
    padding: 0 !important;
    border: 0 !important;
}

form.cart.aecs .aecs_wcp_group_total .aecs_group_final_total {
    text-align: left;
}

form.cart.aecs .aecs_wcp_group_total .aecs_group_final_total .amount {
    font-size: 1.25em !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

form.cart.aecs .e-atc-qty-button-holder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

form.cart.aecs .single_add_to_cart_button {
    background-color: var(--aecs-btn-atc-bg) !important;
    color: var(--aecs-btn-atc-color) !important;
    border-radius: var(--aecs-btn-atc-radius) !important;
    transition: background-color 0.15s, color 0.15s;
}
form.cart.aecs .single_add_to_cart_button:hover {
    background-color: var(--aecs-btn-atc-bg-hover) !important;
    color: var(--aecs-btn-atc-color-hover) !important;
}

@media (max-width: 600px) {
    form.cart.aecs .e-atc-qty-button-holder {
        flex-direction: column;
        align-items: stretch;
    }

    /* Thumbnail list cards: tighten padding on small screens */
    form.cart.aecs .aecs_component_otpions_thumbnails_container ul.products > li {
        padding: 8px;
    }

    /* Selection container: reduce padding */
    .aecs_component_options_selection_container {
        padding: 10px !important;
    }

    /* Component item cards: tighter padding */
    form.cart.aecs .aecs_components_single_item {
        padding: 12px 10px;
    }

    /* Step navigation: ensure prev/next don't overlap center info */
    .aecs_step_navigation {
        flex-wrap: wrap;
        gap: 6px;
    }
    .aecs_step_current_info {
        order: -1;
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 2px;
    }
}

/* ==========================================================================
   Tlačítko Přidat do košíku — všechny produkty (ne jen kompozitní)
   Aplikuje stejné CSS proměnné jako composite ATC button.
   ========================================================================== */
form.cart:not(.aecs) .single_add_to_cart_button {
    background-color: var(--aecs-btn-atc-bg) !important;
    color: var(--aecs-btn-atc-color) !important;
    border-radius: var(--aecs-btn-atc-radius) !important;
    transition: background-color 0.15s, color 0.15s !important;
}
form.cart:not(.aecs) .single_add_to_cart_button:hover {
    background-color: var(--aecs-btn-atc-bg-hover) !important;
    color: var(--aecs-btn-atc-color-hover) !important;
}

/* ==========================================================================
   Composite children + addons in MINI CART (li-based, not table)
   The minicart uses <ul class="cart_list"><li class="mini_cart_item ...">.
   Mirror the visual treatment of the cart-page table rows so children/addons
   read as sub-items of the composite parent, not standalone products.
   ========================================================================== */
/* Same as the cart table: components live in the parent's breakdown card, so
   hide the duplicate per-component mini-cart rows. */
li.mini_cart_item.aecs_component_child_item,
.widget_shopping_cart_content li.aecs_component_child_item {
    display: none !important;
}

/* Composite parent in minicart: drop the bottom border so it visually merges
   with its children below. */
li.mini_cart_item.aecs_component_item,
.widget_shopping_cart_content li.aecs_component_item {
    border-bottom: none !important;
    padding-bottom: 4px !important;
}

/* ==========================================================================
   Bundled addons: hidden in cart/minicart because they appear inside the
   composite parent's breakdown ("Příslušenství: ..."). We keep them as cart
   items so WC's totals remain correct, but suppress their standalone row.
   Orphan addons (parent removed from cart) drop the .aecs_addon_bundled
   class and become visible again.
   ========================================================================== */
tr.aecs_addon_bundled,
li.aecs_addon_bundled,
.widget_shopping_cart_content li.aecs_addon_bundled {
    display: none !important;
}

/* Price sits at the far right of every breakdown row. */
.aecs_cart_breakdown_price {
    margin-left: auto;
    padding-left: 8px;
    font-weight: 600;
    color: var(--gf-accent, #d63638);
    white-space: nowrap;
}

/* Addon row inside the breakdown — distinct "doplněk" badge + accent edge. */
.aecs_cart_breakdown_addon {
    border-left-color: var(--gf-accent, #d63638);
}
.aecs_cart_addon_badge {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gf-muted, #888);
    background: #fff;
    border: 1px solid var(--gf-border, #e8e8e8);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* ==========================================================================
   Composite parent + children: visually nested layout in the cart table.
   The parent's row drops its bottom border so it visually merges with the
   children below; children get heavy left padding plus a vertical guide line
   on the first cell so the eye reads "this belongs to the row above".
   ========================================================================== */
/* (Parent border intentionally left to the theme — components render inside
   the row now, not as child rows below.) */

tr.cart_item.aecs_component_child_item > td:first-child {
    padding-left: 32px !important;
    position: relative;
}

tr.cart_item.aecs_component_child_item > td.product-name {
    padding-left: 12px !important;
    position: relative;
}

/* Vertical "tree" guide on the first cell of every child row, plus a small
   horizontal arm pointing at the product-name cell. */
tr.cart_item.aecs_component_child_item > td:first-child::before {
    content: '';
    position: absolute;
    left: 16px;
    top: -2px;
    bottom: 50%;
    width: 1px;
    background: rgba(0, 0, 0, 0.18);
}

tr.cart_item.aecs_component_child_item > td:first-child::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: rgba(0, 0, 0, 0.18);
}

/* The last child of a composite shouldn't extend the vertical line past its
   own row — close the trunk at its midline. */
tr.cart_item.aecs_component_child_item.aecs_last_child_of_composite > td:first-child::before {
    bottom: 50%;
}

/* Mini cart: greater indent for nested items so they read as sub-items
   regardless of theme padding. Already covered partly above; tighten visual cohesion. */
li.mini_cart_item.aecs_component_item,
.widget_shopping_cart_content li.aecs_component_item {
    margin-bottom: 0 !important;
}

li.mini_cart_item.aecs_component_child_item,
.widget_shopping_cart_content li.aecs_component_child_item {
    border-left: 2px solid rgba(0, 0, 0, 0.12);
    margin-left: 6px !important;
    padding-left: 12px !important;
}
