/*!
 * ak-rounded.css - rounded corners for AgroKrajna (zootechniczny.sklep.pl)
 *
 * Install:
 *   1. Save as  themes/zootech/css/ak-rounded.css
 *   2. In header.tpl, right after {$HOOK_HEADER}, add:
 *        <link rel="stylesheet" href="{$css_dir}ak-rounded.css?v=20261014" type="text/css" media="all" />
 *   3. Remove the old rounding block from the end of global.css (from ":root {" down).
 *   4. Clear the shop cache, hard-refresh (Ctrl+F5). Bump ?v= after every edit.
 *
 * This file must load AFTER every other stylesheet, so that it wins ties
 * against product.css, order-opc.css, agrokrajna-menu.css, compatibility.css...
 *
 * Change --ak-radius / --ak-radius-sm to adjust everything at once.
 */

:root {
  --ak-radius: 12px;     /* large blocks */
  --ak-radius-sm: 10px;  /* buttons, inputs */
  --ak-line: #ddd;       /* divider colour used in lists and tables */
}


/* ================================================================
   1. GENERIC COMPONENTS (Bootstrap defaults are radius 0)
   ================================================================ */

/* Buttons everywhere. Split buttons (search, quantity, voucher) are handled
   further down with more specific selectors, which win over this one. */
.btn { border-radius: var(--ak-radius-sm); }

/* compatibility.css forces radius 0 on the old PrestaShop .button classes */
.button.button-small,
.button.button-medium,
.button.lnk_view,
.button.ajax_add_to_cart_button,
.exclusive_large_disabled { border-radius: var(--ak-radius-sm); }

/* Form fields (input groups keep their flat inner edges via Bootstrap) */
.form-control { border-radius: var(--ak-radius-sm); }

/* Alerts and validation messages */
.alert,
p.warning { border-radius: var(--ak-radius-sm); }

/* Dropdowns (language, currency, sort...) */
.dropdown-menu { border-radius: var(--ak-radius-sm); }

/* Pagination: round only the outer ends */
.pagination > li:first-child > a,
.pagination > li:first-child > span { border-radius: var(--ak-radius-sm) 0 0 var(--ak-radius-sm); }
.pagination > li:last-child > a,
.pagination > li:last-child > span  { border-radius: 0 var(--ak-radius-sm) var(--ak-radius-sm) 0; }

/* Homepage tabs */
.nav-tabs > li > a { border-radius: var(--ak-radius-sm) var(--ak-radius-sm) 0 0; }


/* ================================================================
   2. HEADER: search, cart, menu
   ================================================================ */

/* Search: round the outer ends only, keep the join flat */
#search_block_top .input-group .form-control { border-radius: var(--ak-radius) 0 0 var(--ak-radius); }
#search_block_top .input-group-btn .btn      { border-radius: 0 var(--ak-radius) var(--ak-radius) 0; }

/* Cart */
#blockcart-header   { border-radius: var(--ak-radius); }
#blockcart-dropdown { border-radius: var(--ak-radius); overflow: hidden; }

/* Menu bar (also beats the 6px in agrokrajna-menu.css now that this file loads last) */
#cttopmenu .navbar        { border-radius: var(--ak-radius); }
#cttopmenu .navbar-toggle { border-radius: 8px; }

/* Menu dropdown (agrokrajna-menu.css sets 0 0 8px 8px) */
#cttopmenu .dropdown-menu { border-radius: 0 0 var(--ak-radius) var(--ak-radius); }

/* Desktop: no overflow:hidden (it would clip the mega-menu dropdowns),
   so round the first and last menu items instead. */
@media (min-width: 768px) {
  #cttopmenu .navbar-nav > li:first-child > a { border-radius: var(--ak-radius) 0 0 var(--ak-radius); }
  #cttopmenu .navbar-nav > li:last-child > a  { border-radius: 0 var(--ak-radius) var(--ak-radius) 0; }
}
@media (max-width: 767px) {
  #cttopmenu .navbar { overflow: hidden; }
}

/* Added-to-cart popup */
#layer_cart,
#layer_cart .layer_cart_product,
#layer_cart .layer_cart_cart { border-radius: var(--ak-radius); }
#layer_cart .lc-checkout,
#layer_cart .lc-continue-wrap .continue { border-radius: var(--ak-radius-sm); }


/* ================================================================
   3. BREADCRUMB
   ================================================================ */
.breadcrumb { border-radius: var(--ak-radius); }


/* ================================================================
   4. LEFT COLUMN
   ================================================================ */

/* Category block title */
#blockcategories .title_block { border-radius: var(--ak-radius); overflow: hidden; }

/* The container draws the outline; clipping rounds it */
#blockcategories .block_content.list-group {
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius);
  overflow: hidden;
  background: #fff;
  margin-bottom: 20px;
}

/* Rows only draw the divider lines between them */
#blockcategories .list-group-item {
  border: 0;
  border-bottom: 1px solid var(--ak-line);
  border-radius: 0;
  margin-bottom: 0;
}

/* Toggle arrow button: keep only its left separator */
#blockcategories .btn-toggle {
  border: 0;
  border-left: 1px solid var(--ak-line);
  border-bottom: 1px solid var(--ak-line);
  border-radius: 0;
}

/* Expanded submenu: remove Bootstrap's 20px gap */
#blockcategories .list-group.collapse,
#blockcategories .list-group.collapsing,
#blockcategories .list-group.in { margin-bottom: 0; }

/* No divider under the very last row, so it doesn't double the outer border */
#blockcategories .block_content > :last-child,
#blockcategories .block_content > :last-child .list-group-item { border-bottom: 0; }

/* "Informacje" block (desktop only) */
.blockcms-block-col > p {
  border-radius: var(--ak-radius);
  overflow: hidden;
  /* The inline border-bottom curves awkwardly on rounded corners; remove it.
     Delete this line if you want to keep the divider. */
  border-bottom: 0 !important;
}


/* ================================================================
   5. CATEGORY PAGE
   ================================================================ */

/* Header image and headings */
.aghc-cat-tile { overflow: hidden; border-radius: var(--ak-radius); }
.aghc-cat-head .aghc-cat-tile img { border-radius: var(--ak-radius); }
.aghc-cat-head .page-heading,
#category-subcategories .page-heading,
#category-products .page-heading { border-radius: var(--ak-radius); overflow: hidden; }

/* Subcategory tiles */
#category-subcategories .thumbnail { border-radius: var(--ak-radius); overflow: hidden; }
#category-subcategories .aghc-subcat-img img { border-radius: var(--ak-radius); }

/* Product cards: the border and white background sit on the image box.
   overflow:hidden also clips the hover price overlay and labels to the corners. */
.product-image-container {
  border-radius: var(--ak-radius);
  overflow: hidden;
}


/* ================================================================
   6. PRODUCT PAGE
   ================================================================ */

/* Info box (price, quantity, add to cart) */
.box-info-product { border-radius: var(--ak-radius); }

/* Quantity selector: round the outer ends only */
#quantity_wanted_p .input-group-btn:first-child .btn { border-radius: var(--ak-radius-sm) 0 0 var(--ak-radius-sm); }
#quantity_wanted_p .input-group-btn:last-child .btn  { border-radius: 0 var(--ak-radius-sm) var(--ak-radius-sm) 0; }
#quantity_wanted_p #quantity_wanted { border-radius: 0; }

/* Buttons */
.whatsapp-link,
.aapquestion,
.ajax_add_to_cart_button { border-radius: var(--ak-radius-sm); }

/* product.css forces 4-5px with !important on these */
#add_to_cart button,
.btn-add-to-cart,
.btn-whatsapp,
#send_aap_button,
.aap-side-btn { border-radius: var(--ak-radius-sm) !important; }

/* Small boxes and labels that product.css rounds at 4-6px */
.section-title-modern,
.product-origin-info,
#availability_value,
.aap-oos-info { border-radius: var(--ak-radius-sm); }

/* Info blocks inside the box */
#product_payment_logos .shipping-info-block { border-radius: var(--ak-radius-sm); }
#product_payment_logos .box-security img    { border-radius: var(--ak-radius-sm); }

/* Attachments / downloads panel ("Instrukcja montazu" etc.) */
.panel {
  border-radius: var(--ak-radius);
  overflow: hidden;   /* clips the grey heading bar to the rounded corners */
}
.panel > .panel-heading,
.panel > .panel-body { border-radius: 0; }


/* ================================================================
   7. PRODUCT IMAGE (AJAX-ZOOM)
   The module's own stylesheet loads later, hence the !important.
   ================================================================ */

/* The wrap draws the border and white background, so it gets the radius.
   overflow:hidden clips the zoomed photo to the rounded corners. */
div.axZm_mouseOverZoomContainerWrap {
  border-radius: var(--ak-radius) !important;
  overflow: hidden !important;
}

/* Inner layers: keep them square, the wrap does the clipping */
div.axZm_mouseOverZoomContainer,
div.axZm_mouseOverWrapper,
div.axZm_mouseOverImg { border-radius: 0 !important; }

/* Gallery thumbnails: the module forces border-radius: 0 on the slider items */
.axZm_mouseOverZoomGallerySlider .axZmThumbSlider li,
.azThumb li {
  border-radius: var(--ak-radius-sm) !important;
  overflow: hidden !important;
}
.axZm_mouseOverZoomGallerySlider .axZmThumbSlider li img.thumb { border-radius: 0 !important; }

/* Flyout zoom window (only used in "flyout" mode, harmless otherwise) */
div.axZm_mouseOverFlyOut { border-radius: var(--ak-radius) !important; overflow: hidden; }


/* ================================================================
   8. "ASK ABOUT PRODUCT" FORM
   ================================================================ */
#send_AAP_form { border-radius: var(--ak-radius); }
#send_AAP_form .form-control,
#send_AAP_form .aap-submit,
#send_AAP_form .aap-disclaimer,
#send_AAP_form img { border-radius: var(--ak-radius-sm); }

/* Popup window around the form (fancybox 1.3 and 2.x class names) */
#fancybox-outer, #fancybox-content, .fancybox-skin, .fancybox-inner { border-radius: var(--ak-radius); }


/* ================================================================
   9. TABLES inside .table-responsive
   Order history, order detail, discounts, product data sheet, comparison.
   The wrapper draws the outline; the table gives up its own outer border.
   ================================================================ */
.table-responsive {
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius);
}
.table-responsive > .table-bordered { border: 0; margin-bottom: 0; }

.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > td:first-child { border-left: 0; }

.table-responsive > .table-bordered > thead > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > td:last-child { border-right: 0; }

.table-responsive > .table-bordered > thead > tr:first-child > th { border-top: 0; }

.table-responsive > .table-bordered > tbody > tr:last-child > th,
.table-responsive > .table-bordered > tbody > tr:last-child > td,
.table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; }


/* ================================================================
   10. CHECKOUT (one-page order, body#order-opc)
   ================================================================ */

/* Step headings: "1 Kup bez rejestracji...", "2 Sposob dostawy", "3 Platnosc", "Podsumowanie zakupow" */
#order-opc .page-heading { border-radius: var(--ak-radius); overflow: hidden; }

/* Boxes: login form, address form, delivery and payment containers */
#order-opc .box { border-radius: var(--ak-radius); }
#order-opc .opc-overlay { border-radius: var(--ak-radius); }   /* grey loading layer over each step */

/* Buttons: Zamawiam z obowiazkiem zaplaty, Uzyj, Zaloguj sie, Kopiuj dane, Kontynuuj zakupy, +/- */
#order-opc .btn { border-radius: var(--ak-radius-sm); }
#order-opc .btn > span { border-radius: inherit; }

/* Voucher field: round the outer ends only (order-opc.css sets 3px) */
#order-opc #cart_voucher #discount_name { border-radius: var(--ak-radius-sm) 0 0 var(--ak-radius-sm); }
#order-opc #cart_voucher button[type="submit"] { border-radius: 0 var(--ak-radius-sm) var(--ak-radius-sm) 0; }

/* ---------- Delivery options ---------- */
/* The wrapper draws the outline, the table inside keeps only its inner dividers */
#opc_delivery_methods .delivery_option > div {
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius-sm);
  overflow: hidden;
}
#opc_delivery_methods table.resume { border: 0; margin-bottom: 0; }
#opc_delivery_methods table.resume td { border-top: 0; border-bottom: 0; }
#opc_delivery_methods table.resume td:first-child { border-left: 0; }
#opc_delivery_methods table.resume td:last-child  { border-right: 0; }

/* ---------- Payment methods (bank transfer, imoje, BLIK, cards...) ---------- */
#opc_payment_methods p.payment_module a { border-radius: var(--ak-radius-sm); }

/* imoje "Prosze czekac" box: its radius is an inline style, so it needs !important */
#imoje_loading > div { border-radius: var(--ak-radius) !important; }

/* ---------- Cart summary table (desktop) ---------- */
/* The wrapper draws the outline; the table gives up its own outer border */
#order-detail-content {
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 20px;
}
#order-detail-content > #cart_summary { border: 0; margin-bottom: 0; }

#cart_summary > thead > tr > th:first-child,
#cart_summary > tbody > tr > td:first-child,
#cart_summary > tfoot > tr > td.cart_voucher { border-left: 0; }

#cart_summary > thead > tr > th:last-child,
#cart_summary > tbody > tr > td:last-child,
#cart_summary > tfoot > tr > td:last-child { border-right: 0; }

#cart_summary > thead > tr:first-child > th { border-top: 0; }
#cart_summary > tfoot > tr:last-child > td  { border-bottom: 0; }

/* Product thumbnail in the cart */
#cart_summary .cart_product img { border-radius: var(--ak-radius-sm); }

/* ---------- Cart summary (mobile cards, order-opc.css sets 4px) ---------- */
@media (max-width: 767px) {
  #order-opc #cart_summary > tfoot,
  #order-opc #cart_summary > tbody > tr.cart_item,
  #order-opc #cart_summary > tbody > tr.customization,
  #order-opc #cart_summary > tbody > tr.cart_discount { border-radius: var(--ak-radius); }
}

@media (max-width: 767px) {
  .product_list .ajax_add_to_cart_button.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #cttopmenu .navbar-toggle {
    min-height: 44px;
  }
}

/* ================================================================
   11. STRONA MARKI (manufacturer.tpl, 2026-10-15)
   Logo + H1 w jednym wierszu, krótki wstęp, pełny opis marki pod listą produktów (#o-marce).
   ================================================================ */
#manufacturer-info .ak-brand-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
#manufacturer-info .ak-brand-head .page-heading { flex: 1 1 auto; min-width: 0; margin: 0; border-radius: var(--ak-radius); overflow: hidden; }
#manufacturer-info .ak-brand-logo {
  flex: 0 0 auto; width: 96px; height: 96px; margin: 0; padding: 6px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e6e8eb; border-radius: var(--ak-radius); overflow: hidden;
}
#manufacturer-info .ak-brand-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
#manufacturer-info .ak-brand-lead { font-size: 14px; line-height: 1.55; color: #333; margin: 0 0 18px; max-width: 920px; }
#manufacturer-info .ak-brand-lead.rte p:last-child { margin-bottom: 0; }
.ak-brand-more { font-weight: 600; white-space: nowrap; }
.ak-brand-more::after { content: " \2193"; }
#manufacturer-products .page-heading,
#o-marce .page-heading { border-radius: var(--ak-radius); overflow: hidden; }
#o-marce { margin-top: 30px; scroll-margin-top: 12px; }
#o-marce .rte { max-width: 920px; font-size: 14px; line-height: 1.6; }
#o-marce .rte h2 { font-size: 20px; line-height: 1.3; margin: 20px 0 8px; }
#o-marce .rte h3 { font-size: 17px; line-height: 1.3; margin: 18px 0 6px; }
#o-marce .rte h4 { font-size: 15px; margin: 14px 0 6px; }
#o-marce .rte p { margin: 0 0 10px; }
#o-marce .rte p:empty { display: none; }
#o-marce .rte ul, #o-marce .rte ol { margin: 0 0 12px; padding-left: 20px; }
#o-marce .rte li { margin: 0 0 6px; }
