/*
Theme Name:   SklepGwint
Theme URI:    https://sklepgwint.pl
Description:  Samodzielny motyw WooCommerce dla branży hydrauliczno-budowlanej. Hydraulika, narzędzia, farby, kleje, okucia, zamki.
Author:       sklepgwint.pl
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
WC requires at least: 8.0
WC tested up to: 9.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  sklepgwint
Tags: woocommerce, e-commerce, right-sidebar, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #F5F5F5;
    color: #1A2B4A;
    line-height: 1.6;
    font-size: 15px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #E85D04; text-decoration: none; transition: color .2s; }
a:hover { color: #1A2B4A; }

ul, ol { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.content-area {
    display: flex;
    gap: 24px;
    padding: 24px 0 40px;
    flex: 1;
}

.main-content { flex: 1; min-width: 0; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
    background: #1A2B4A;
    color: #90a8c0;
    font-size: 12px;
    padding: 6px 0;
}

#topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#topbar a { color: #90a8c0; }
#topbar a:hover { color: #E85D04; }

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
    background: #fff;
    border-bottom: 3px solid #E85D04;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

#masthead .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.site-branding { flex-shrink: 0; }

.site-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.site-title a { color: #1A2B4A; }
.site-title a span { color: #E85D04; }

.site-description { font-size: 11px; color: #888; margin-top: 2px; }

/* Search */
.header-search { flex: 1; }

.header-search form {
    display: flex;
}

.header-search input[type="search"] {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 9px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.header-search input[type="search"]:focus { border-color: #E85D04; }

.header-search button {
    background: #E85D04;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 9px 18px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}

.header-search button:hover { background: #1A2B4A; }

/* Header icons */
.header-icons {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

.header-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #1A2B4A;
    cursor: pointer;
    text-decoration: none;
    gap: 2px;
    position: relative;
}

.header-icon svg { width: 22px; height: 22px; stroke: #1A2B4A; fill: none; }
.header-icon:hover svg { stroke: #E85D04; }
.header-icon:hover { color: #E85D04; }

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #E85D04;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#site-navigation {
    background: #1A2B4A;
}

#site-navigation .container { position: relative; }

#primary-menu {
    display: flex;
    flex-wrap: wrap;
}

#primary-menu > li > a {
    display: block;
    color: #ccd8e4;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a {
    background: #E85D04;
    color: #fff;
}

#primary-menu > li.menu-promo > a { color: #ffc947; }

/* Dropdown */
#primary-menu li { position: relative; }

#primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e3455;
    min-width: 200px;
    border-top: 2px solid #E85D04;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

#primary-menu li:hover > .sub-menu { display: block; }

#primary-menu .sub-menu li a {
    display: block;
    color: #ccd8e4;
    font-size: 13px;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background .15s;
}

#primary-menu .sub-menu li a:hover { background: #E85D04; color: #fff; }

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 16px;
    cursor: pointer;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb-wrap {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 8px 0;
    font-size: 12px;
    color: #888;
}

.breadcrumb-wrap a { color: #888; }
.breadcrumb-wrap a:hover { color: #E85D04; }
.breadcrumb-wrap .current { color: #E85D04; font-weight: 500; }
.breadcrumb-wrap span + span::before { content: ' › '; color: #ccc; }

/* ============================================================
   USP BAR
   ============================================================ */
.usp-bar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 14px 0;
}

.usp-bar .container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.usp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.usp-item svg { width: 24px; height: 24px; stroke: #E85D04; fill: none; flex-shrink: 0; }
.usp-item strong { display: block; font-size: 13px; font-weight: 600; color: #1A2B4A; }
.usp-item span { color: #666; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
    background: #1A2B4A;
    padding: 40px 0;
    margin-bottom: 28px;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.hero-text { flex: 1; }

.hero-tag {
    background: #E85D04;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-text h1 {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-text h1 span { color: #E85D04; }

.hero-text p { color: #90a8c0; font-size: 15px; margin-bottom: 20px; line-height: 1.6; }

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.btn-primary {
    background: #E85D04;
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: background .2s;
}

.btn-primary:hover { background: #c94e02; color: #fff; }

.btn-outline {
    background: transparent;
    color: #fff;
    padding: 11px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,.3);
    cursor: pointer;
    display: inline-block;
    transition: border-color .2s;
}

.btn-outline:hover { border-color: rgba(255,255,255,.7); color: #fff; }

.hero-badges { display: flex; gap: 24px; flex-wrap: wrap; }

.hero-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #90a8c0;
    font-size: 12px;
}

.hero-badge svg { width: 18px; height: 18px; stroke: #E85D04; fill: none; }

/* ============================================================
   KATEGORIE
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1A2B4A;
    white-space: nowrap;
}

.section-line { flex: 1; height: 2px; background: #f0f0f0; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.cat-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 18px 10px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: border-color .2s, box-shadow .2s;
}

.cat-card:hover {
    border-color: #E85D04;
    box-shadow: 0 2px 10px rgba(232,93,4,.1);
}

.cat-card .cat-icon {
    font-size: 30px;
    display: block;
    margin-bottom: 8px;
}

.cat-card .cat-name {
    font-size: 12px;
    font-weight: 600;
    color: #1A2B4A;
    display: block;
}

.cat-card .cat-count {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 2px;
}

/* ============================================================
   BANERY PROMO
   ============================================================ */
.promo-strip {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.promo-big {
    background: #1A2B4A;
    border-radius: 8px;
    padding: 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.promo-big::after {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 130px; height: 130px;
    background: rgba(232,93,4,.15);
    border-radius: 50%;
}

.promo-tag {
    background: #E85D04;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.promo-big h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.promo-big p { font-size: 13px; color: #90a8c0; margin-bottom: 16px; line-height: 1.5; }

.promo-small {
    background: #E85D04;
    border-radius: 8px;
    padding: 24px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-small h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.promo-small p { font-size: 13px; opacity: .85; margin-bottom: 16px; line-height: 1.5; }

.btn-white {
    background: #fff;
    color: #E85D04;
    border: none;
    padding: 9px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    transition: opacity .2s;
}

.btn-white:hover { opacity: .9; color: #E85D04; }

.btn-white-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.5);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: border-color .2s;
}

.btn-white-outline:hover { border-color: #fff; color: #fff; }

/* ============================================================
   PRODUKTY — SIATKA WOOCOMMERCE
   ============================================================ */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: auto !important;
    transition: box-shadow .2s, border-color .2s !important;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
    border-color: #E85D04 !important;
}

.woocommerce ul.products li.product a img {
    border-bottom: 1px solid #f0f0f0;
    width: 100% !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1A2B4A !important;
    padding: 10px 12px 4px !important;
    line-height: 1.35 !important;
}

.woocommerce ul.products li.product .price {
    color: #E85D04 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 0 12px 8px !important;
    display: block !important;
}

.woocommerce ul.products li.product .price del {
    color: #999 !important;
    font-size: 12px !important;
}

.woocommerce ul.products li.product .button {
    display: block !important;
    margin: 0 12px 12px !important;
    width: calc(100% - 24px) !important;
    text-align: center !important;
    background: #1A2B4A !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .2s !important;
}

.woocommerce ul.products li.product .button:hover {
    background: #E85D04 !important;
}

/* Sale badge */
.woocommerce span.onsale {
    background: #E85D04 !important;
    border-radius: 3px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    min-height: auto !important;
    min-width: auto !important;
    padding: 3px 8px !important;
    line-height: 1.4 !important;
    top: 8px !important;
    left: 8px !important;
}

/* ============================================================
   STRONA PRODUKTU
   ============================================================ */
.woocommerce div.product .product_title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1A2B4A !important;
    margin-bottom: 12px !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: #E85D04 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
}

.woocommerce div.product .single_add_to_cart_button {
    background: #E85D04 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
    cursor: pointer !important;
    transition: background .2s !important;
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: #1A2B4A !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #1A2B4A !important;
    border-top: 3px solid #E85D04 !important;
}

/* ============================================================
   KOSZYK & CHECKOUT
   ============================================================ */
.woocommerce-cart-form .button,
.woocommerce #payment #place_order,
.woocommerce-checkout #payment #place_order {
    background: #E85D04 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 14px 28px !important;
    cursor: pointer !important;
}

/* ============================================================
   SIDEBAR WIDGETY
   ============================================================ */
.sidebar .widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}

.sidebar .widget-title,
.sidebar .widgettitle {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1A2B4A !important;
    border-bottom: 2px solid #E85D04 !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
}

.sidebar .widget ul li a {
    color: #444;
    font-size: 13px;
    padding: 4px 0;
    display: block;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar .widget ul li a:hover { color: #E85D04; }

/* Filtr ceny */
.woocommerce .widget_price_filter .ui-slider-range { background: #E85D04; }
.woocommerce .widget_price_filter .ui-slider-handle { background: #1A2B4A; border-color: #1A2B4A; }
.woocommerce .widget_price_filter .price_slider_amount .button { background: #1A2B4A !important; }

/* ============================================================
   MARKI
   ============================================================ */
.brands-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 28px;
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.brand-item {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    transition: border-color .2s;
}

.brand-item:hover { border-color: #E85D04; color: #E85D04; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section {
    background: #1A2B4A;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.newsletter-text { flex: 1; color: #fff; }
.newsletter-text h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.newsletter-text p { font-size: 13px; color: #90a8c0; }

.newsletter-form { display: flex; flex: 1; min-width: 280px; }

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    outline: none;
}

.newsletter-form button {
    background: #E85D04;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.newsletter-form button:hover { background: #c94e02; }

/* ============================================================
   POWIADOMIENIA WOOCOMMERCE
   ============================================================ */
.woocommerce-message { border-top-color: #E85D04 !important; }
.woocommerce-message::before { color: #E85D04 !important; }
.woocommerce-info { border-top-color: #1A2B4A !important; }

/* ============================================================
   STOPKA
   ============================================================ */
#colophon {
    background: #1A2B4A;
    color: #90a8c0;
    margin-top: auto;
}

.footer-widgets {
    padding: 36px 0 24px;
}

.footer-widgets .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-widget h3,
.footer-widget .widget-title {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
}

.footer-widget p { font-size: 13px; line-height: 1.7; margin-bottom: 6px; }

.footer-widget ul li { margin-bottom: 7px; }
.footer-widget ul li a { color: #90a8c0; font-size: 13px; }
.footer-widget ul li a:hover { color: #E85D04; }

.footer-hours {
    background: rgba(255,255,255,.05);
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-size: 12px;
}

.footer-hours div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.footer-hours .closed { color: #E85D04; }

.site-info {
    background: #0f1e33;
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 14px 0;
}

.site-info .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #667c94;
    flex-wrap: wrap;
    gap: 8px;
}

.site-info a { color: #667c94; margin-left: 12px; }
.site-info a:hover { color: #E85D04; }

.payment-methods { display: flex; gap: 6px; }

.pay-badge {
    background: rgba(255,255,255,.1);
    color: #ccc;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
}

/* ============================================================
   WOOCOMMERCE — SORTOWANIE I WYNIKI
   ============================================================ */
.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
}

.woocommerce-result-count { font-size: 13px; color: #666; }

/* ============================================================
   PAGINACJA
   ============================================================ */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    color: #1A2B4A;
    border-color: #e0e0e0;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #E85D04 !important;
    color: #fff !important;
    border-color: #E85D04 !important;
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 900px) {
    .footer-widgets .container { grid-template-columns: 1fr 1fr; gap: 20px; }
    .promo-strip { grid-template-columns: 1fr; }
    .content-area { flex-direction: column; }
    .sidebar { width: 100%; }
}

@media (max-width: 768px) {
    #masthead .container { flex-wrap: wrap; }
    .header-search { order: 3; width: 100%; }
    .site-title { font-size: 20px; }

    .menu-toggle { display: block; }
    #primary-menu { display: none; flex-direction: column; }
    #primary-menu.active { display: flex; }
    #primary-menu > li > a { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
    #primary-menu .sub-menu { position: static; display: none; }
    #primary-menu .sub-menu.active { display: block; }

    .hero-inner { flex-direction: column; }
    .hero-text h1 { font-size: 22px; }

    .usp-bar .container { flex-direction: column; gap: 8px; }

    .cat-grid { grid-template-columns: repeat(3, 1fr); }

    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .newsletter-section { flex-direction: column; }
    .newsletter-form { width: 100%; }

    #topbar .container { flex-direction: column; gap: 4px; text-align: center; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }

    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: 1fr !important;
    }

    .footer-widgets .container { grid-template-columns: 1fr; }
    .hero-badges { flex-direction: column; gap: 8px; }
}
