/* =======================================================================
   CSS VARIABLES - Matching index.html
======================================================================= */

:root {
    --bg: #0b0d10;
    --panel: #11141a;
    --line: #1c2027;
    --ink: #e9eef7;
    --muted: #a1acbc;
    --brand: #9BEC6A;
    --brand-ink: #0b0d10;
    --maxw: 1040px;
    --r: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    
    /* Legacy support */
    --bg-primary: var(--bg);
    --bg-secondary: #111;
    --bg-panel: var(--panel);
    --text-primary: var(--ink);
    --text-secondary: var(--ink);
    --text-muted: var(--muted);
    --border-color: var(--line);
    --border-light: #222;
    --brand-color: var(--brand);
    --brand-text: var(--brand-ink);
}

/* =======================================================================
   GLOBAL
======================================================================= */

html,
body {
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(1200px 600px at 0% -10%, #0f141b 0%, transparent 60%),
                radial-gradient(1000px 480px at 100% 0%, #0e1520 0%, transparent 55%),
                var(--bg);
    color: var(--ink);
    font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* =======================================================================
   HEADER – ujednolicenie jak na landing page
======================================================================= */

.site-header,
.header,
.wp-block-template-part {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
}

.site-title a,
.header a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
}

/* Header navigation styling to match landing page */
header .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 12px;
}

header .nav nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .6rem .9rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.2s ease;
}

header .nav a:hover {
    border-color: var(--brand);
    /* Also apply brand background and dark text so nav links visibly change on hover */
    background: var(--brand);
    color: var(--brand-ink);
}

header .nav a.cta:not([href*="pstrong-climbing.pl"]) {
    background: var(--brand);
    color: var(--brand-ink);
    border-color: transparent;
    font-weight: 800;
}

header .nav a.cta[href*="pstrong-climbing.pl"] {
    background: none;
    color: var(--text-secondary);
    border-color: var(--border-color);
    font-weight: 700;
}

body.woocommerce header .nav a {
    font-size: 0.98rem;
    padding: .44rem .70rem;
}

header .nav a.cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

header .nav a .cart-count {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Responsive navigation */
@media (max-width: 768px) {
    header .nav {
        flex-wrap: wrap;
    }
    
    header .nav a {
        padding: .5rem .75rem;
        font-size: 0.9rem;
    }
}


/* =======================================================================
   LAYOUT - Matching index.html
======================================================================= */

.wrap {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Ensure wrap has proper padding on mobile */
@media (max-width: 768px) {
    .wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Force all content inside wrap to respect boundaries */
    .wrap * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

main {
    padding: 28px 0 8px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 16, .65);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(160%) blur(10px);
    margin-bottom: 0;
}

header .wrap.nav {
    padding-bottom: 0;
    margin-bottom: 0;
}

.brand {
    font-weight: 800;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 14px #9bec6a77;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}

.card.small {
    padding: 16px;
}

/* =======================================================================
   SHOP LIST – wygląd listy produktów (matching index.html style)
======================================================================= */

.woocommerce-page .page-title,
.woocommerce .woocommerce-products-header {
    margin-bottom: 28px;
}

.woocommerce-page .page-title h1,
.woocommerce .woocommerce-products-header h1 {
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.12;
    margin: 0 0 10px;
    color: var(--ink);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    color: var(--muted);
    margin-bottom: 20px;
}

.woocommerce .woocommerce-ordering select {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    padding: 8px 12px;
}

/* Usunięcie obramowania i dziwnych ramek */
.woocommerce ul.products li.product {
    box-shadow: none;
    border: none;
}

/* Zmiana układu na listę pionową z card styling */
.woocommerce ul.products {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.woocommerce ul.products li.product {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .5);
}

/* Obrazek produktu */
.woocommerce ul.products li.product {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.woocommerce ul.products li.product img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .woocommerce ul.products li.product img {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    /* Ensure text doesn't overflow in product list */
    .woocommerce ul.products li.product * {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}


/* =======================================================================
   BUTTONS
======================================================================= */

/* Add to cart (list view) - Force override WooCommerce defaults */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button,
.woocommerce ul.products li.product input.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.add_to_cart_button {
    background: var(--brand) !important;
    background-color: var(--brand) !important;
    color: var(--brand-ink) !important;
    font-weight: 700 !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product button.button:hover,
.woocommerce ul.products li.product input.button:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    background: var(--brand) !important;
    background-color: var(--brand) !important;
}

/* Product info container */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    flex-shrink: 0;
}

.woocommerce ul.products li.product .product-info-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 8px;
}

.woocommerce ul.products li.product .product-info-content .woocommerce-loop-product__title {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
}

.woocommerce ul.products li.product .product-info-content .woocommerce-loop-product__title a {
    color: var(--ink);
    text-decoration: none;
}

.woocommerce ul.products li.product .product-info-content .woocommerce-loop-product__title a:hover {
    /* Make product title hover use the full brand background with dark text so the
       change is visible and readable (overrides the simple color-only rule). */
    color: var(--brand-ink);
    background: var(--brand);
    border-radius: 6px;
    padding: 2px 6px;
    text-decoration: none;
}

.woocommerce ul.products li.product .product-info-content .price {
    color: var(--brand);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.woocommerce ul.products li.product .product-info-content .product-short-description {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    min-height: 0;
}

.woocommerce ul.products li.product .product-info-content .button {
    margin-top: auto;
    align-self: flex-start;
    flex-shrink: 0;
}

/* Add to cart (product page) - Force override WooCommerce defaults */
.single_add_to_cart_button,
button.single_add_to_cart_button,
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.button,
.woocommerce div.product form.cart input.button,
.woocommerce div.product .single_add_to_cart_button.button,
.woocommerce div.product button.single_add_to_cart_button {
    background: var(--brand) !important;
    background-color: var(--brand) !important;
    color: var(--brand-ink) !important;
    padding: 16px 28px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.single_add_to_cart_button:hover,
button.single_add_to_cart_button:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart button.button:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    background: var(--brand) !important;
    background-color: var(--brand) !important;
}

/* Remove WooCommerce default blue */
.woocommerce-message {
    border-top-color: var(--brand);
}

/* =======================================================================
   PRODUCT PAGE
======================================================================= */

.woocommerce div.product div.images {
    max-width: 300px;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce div.product div.images img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #000;
    border-radius: var(--r);
    box-sizing: border-box;
    max-width: 100%;
    display: block;
}

/* Mobile: Add padding and proper scaling for product images */
@media (max-width: 768px) {
    .woocommerce div.product div.images {
        max-width: 100%;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        margin: 0;
    }
    
    .woocommerce div.product div.images img {
        max-width: 100%;
        width: 100%;
        max-height: 400px;
        height: auto;
        box-sizing: border-box;
        object-fit: contain;
    }
}

.woocommerce div.product div.images .flex-control-thumbs {
    margin-top: 12px;
}

.woocommerce div.product div.images .flex-control-thumbs img {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

/* Mobile: Scale down thumbnails and ensure they fit */
@media (max-width: 768px) {
    .woocommerce div.product div.images .flex-control-thumbs {
        padding: 0 20px; /* Match main image padding */
        margin-top: 16px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .woocommerce div.product div.images .flex-control-thumbs img {
        height: 50px;
        max-width: 50px;
        width: auto;
    }
}

.woocommerce div.product div.images .flex-control-thumbs img:hover,
.woocommerce div.product div.images .flex-control-thumbs img.flex-active {
    border-color: var(--brand);
}

/* title */
.woocommerce div.product .product_title {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 700;
    word-wrap: normal;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 768px) {
    .woocommerce div.product .product_title {
        font-size: clamp(24px, 5vw, 36px);
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        white-space: normal !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* price */
.woocommerce div.product p.price {
    color: var(--brand);
    font-size: 26px;
    word-wrap: normal;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 768px) {
    .woocommerce div.product p.price {
        font-size: clamp(20px, 4vw, 26px);
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        white-space: normal !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Quantity input styling */
.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel);
}

.woocommerce .quantity .qty-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--brand);
    color: var(--brand-ink);
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    padding: 0;
    margin: 0;
}

.woocommerce .quantity .qty-button:hover:not(:disabled) {
    opacity: 0.9;
    background: var(--brand);
}

.woocommerce .quantity .qty-button:active:not(:disabled) {
    transform: scale(0.95);
}

.woocommerce .quantity .qty-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--line);
    color: var(--muted);
}

.woocommerce .quantity input.qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-weight: 700;
    font-size: 16px;
    padding: 0;
    appearance: textfield;
    -moz-appearance: textfield;
}

.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce .quantity input.qty:focus {
    outline: none;
    background: var(--bg-secondary);
}

/* =======================================================================
   SIDEBAR – HIDE EVERYTHING (AGGRESSIVE)
======================================================================= */

/* Hide all possible sidebar variations */
#sidebar,
.sidebar,
.widget-area,
aside.sidebar,
.woocommerce-sidebar,
.secondary,
.content-sidebar,
.site-sidebar,
.widget,
.widgets,
.sidebar-widget,
.widget-container,
#secondary,
#tertiary,
.widget-area,
aside.widget,
div.widget,
section.widget,
.widget_block,
.wp-block-widget,
.woocommerce-widget,
.woocommerce .widget,
.woocommerce-page .widget-area,
.woocommerce-page #sidebar,
.woocommerce-page .sidebar,
.woocommerce-page aside,
.woocommerce-page .widget,
.woocommerce-page .widgets,
.woocommerce-page .secondary,
.woocommerce-page .content-sidebar,
.woocommerce-page .site-sidebar,
.woocommerce-page .widget-area,
.woocommerce-page aside.sidebar,
.woocommerce-page .woocommerce-sidebar,
body.woocommerce-page #sidebar,
body.woocommerce-page .sidebar,
body.woocommerce-page .widget-area,
body.woocommerce-page aside,
body.woocommerce-page .secondary,
body.woocommerce-page .content-sidebar,
body.woocommerce-page .site-sidebar,
body.woocommerce-page .woocommerce-sidebar,
.woocommerce-page .woocommerce .widget,
.woocommerce-page .woocommerce .widget-area,
.woocommerce-page .woocommerce #sidebar,
.woocommerce-page .woocommerce .sidebar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

/* Ensure main content takes full width when sidebar is hidden */
body:not(.woocommerce-page) .site-main,
.woocommerce-page .site-main,
.site-content,
.woocommerce-page .site-content,
body.woocommerce-page .site-main,
body.woocommerce-page .site-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Layout adjustments for full-width content */
.content-area,
.woocommerce-page .content-area,
body.woocommerce-page .content-area {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide WooCommerce product sidebar specifically - already covered above */

/* Hide any widget containers */
.widget-container,
.widget-wrapper,
.widget-box {
    display: none !important;
}

/* =======================================================================
   FOOTER – Matching index.html
======================================================================= */

footer {
    border-top: 1px solid var(--line);
    padding: 22px 0;
    color: var(--muted);
    font-size: .95rem;
}

.footer-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.footer-copy {
    color: var(--muted);
    font-size: .95rem;
}

.socials {
    display: flex;
    gap: 22px;
}

.social-link {
    display: inline-flex;
    color: #fff;
    transition: color .25s ease;
    text-decoration: none;
}

.social-link:hover {
    color: var(--brand);
}

.social-link svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Hide default WordPress footers */
.site-footer:not(footer),
.wp-block-footer:not(footer),
#colophon:not(footer) {
    display: none;
}

/* =======================================================================
   PRODUCT PAGE LAYOUT
======================================================================= */

/* Move inline styles from content-single-product.php to CSS */
.woocommerce .product-card {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.woocommerce .product-card .product-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.woocommerce .product-card .product-images {
    flex: 0 0 300px;
    max-width: 300px;
}

.woocommerce .product-card .product-images img {
    width: 100%;
    height: auto;
    border-radius: var(--r);
}

.woocommerce .product-card .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.woocommerce .product-card .product-header {
    flex: 0 0 auto;
    margin-bottom: 20px;
}

.woocommerce .product-card .product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.woocommerce .product-card .woocommerce-product-details__short-description {
    flex: 1;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.woocommerce .product-card .product-add-to-cart {
    flex: 0 0 auto;
    margin-top: auto;
    margin-bottom: 96px; /* larger buffer between quantity/add-to-cart and any payment buttons */
}

/* Spacing between quantity and add to cart button */
.woocommerce .product-card .product-add-to-cart form.cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.woocommerce .product-card .product-add-to-cart .quantity {
    margin-bottom: 0;
    margin-right: 0;
}

.woocommerce .product-card .product-add-to-cart .single_add_to_cart_button {
    margin-top: 0;
    margin-left: 0;
}

@media (max-width: 768px) {
    /* Global text wrapping for all product card content - wrap only at word boundaries */
    .woocommerce .product-card,
    .woocommerce .product-card * {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        white-space: normal !important;
    }
    
    .woocommerce .product-card {
        padding: 16px !important;
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    
    .woocommerce .product-card .product-layout {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .woocommerce .product-card .product-images {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        margin: 0;
    }
    
    .woocommerce .product-card .product-images img {
        max-width: 100%;
        width: 100%;
        max-height: 400px;
        height: auto;
        object-fit: contain;
        box-sizing: border-box;
        display: block;
        margin: 0 auto;
    }
    
    .woocommerce .product-card .product-details {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        overflow: visible;
    }
    
    /* Ensure text wraps properly - wrap only at word boundaries (spaces) */
    .woocommerce .product-card .product-details {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }
    
    .woocommerce .product-card .product-details * {
        max-width: 100% !important;
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        overflow: visible !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }
    
    .woocommerce .product-card .product_title,
    .woocommerce .product-card h1.product_title,
    .woocommerce .product-card h1,
    .woocommerce .product-card .product_title.entry-title,
    .woocommerce .product-card .entry-title {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        display: block !important;
        box-sizing: border-box !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    
    .woocommerce .product-card .product-short-description,
    .woocommerce .product-card .woocommerce-product-details__short-description,
    .woocommerce .product-card .product-short-description p,
    .woocommerce .product-card .woocommerce-product-details__short-description p,
    .woocommerce .product-card .product-short-description *,
    .woocommerce .product-card .woocommerce-product-details__short-description * {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        display: block !important;
        box-sizing: border-box !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    
    .woocommerce .product-card .price,
    .woocommerce .product-card p.price,
    .woocommerce .product-card .price * {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .woocommerce .product-card form.cart {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .woocommerce .product-card .single_add_to_cart_button {
        max-width: 100% !important;
        box-sizing: border-box;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

/* Hide the magnifying glass on single product images */
.woocommerce .woocommerce-product-gallery__trigger {
    display: none !important;
}
/* Or to restyle: 
.woocommerce .woocommerce-product-gallery__trigger {
    color: var(--brand)!important;
    background: none!important;
    font-size: 24px!important;
}*/

.woocommerce .product-card .product-add-to-cart {
    margin-bottom: 96px;
}

/* Extra spacing for product page cart form to clear injected third-party buttons (e.g. GPay) */
.single-product .woocommerce div.product form.cart,
.woocommerce div.product form.cart {
    margin-bottom: 96px; /* ensure ample space under the cart form so injected buttons don't overlap */
    padding-bottom: 0.5rem;
}

/* Aggressively hide Google Pay on single product pages (and fallbacks) */
.single-product .gpay-button,
.single-product [id*="gpay"],
.single-product [class*="gpay"],
.single-product [id*="google"],
.single-product [class*="google"],
.single-product [data-provider*="gpay"],
.single-product [aria-label*="Google"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}

/* If hiding fails (3rd-party), push the Google Pay container away from the add-to-cart area */
#google-button-container,
.gpay-button-fill,
.gpay-button,
#gpay-button-online-api-id {
    margin-top: 36px !important;
}

/* Additional fallback: if the GPay element is injected outside or after the form, ensure
   the immediate sibling after the cart form gets spacing so it never sits directly under
   the add-to-cart controls. */
.woocommerce div.product form.cart {
    margin-bottom: 96px !important;
    padding-bottom: 0 !important;
}

.woocommerce div.product form.cart + * {
    margin-top: 36px !important;
}

/* Fallback: if iframe or inner element is placed directly after the form, push it down */
.woocommerce div.product form.cart + iframe,
.woocommerce div.product form.cart + div > iframe {
    margin-top: 48px !important;
}

/* Hide Google Pay by any selector (aggressive) */
.woocommerce .product-card [id*="gpay"],
.woocommerce .product-card [class*="gpay"],
.woocommerce .product-card [id*="google"],
.woocommerce .product-card [class*="google"],
.woocommerce .product-card [data-provider*="gpay"],
.woocommerce .product-card .gpay-button,
.woocommerce form.cart [id*="gpay"],
.woocommerce form.cart [class*="gpay"],
.woocommerce form.cart [id*="google"],
.woocommerce form.cart [class*="google"],
.woocommerce form.cart [data-provider*="gpay"] {
  display: none !important;
  margin: 0!important; padding: 0!important;
  height: 0!important; min-height:0!important;
  opacity: 0!important; visibility:hidden!important;
}

/* Strong magnifying glass icon removal (gallery trigger, Photoswipe) */
.woocommerce-product-gallery__trigger,
.woocommerce .pswp__button,
.woocommerce .woocommerce-product-gallery--with-images .flex-control-nav
{
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Fix for carousel/gallery if theme disables flex or thumbnails */
.woocommerce .product-images .woocommerce-product-gallery__wrapper {
    display: flex !important; /* ensure images are side by side if JS initializes */
    gap: 0;
}

/* Mobile carousel for product images */
@media (max-width: 768px) {
    .woocommerce .product-images {
        position: relative;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but enable horizontal swiping */
    }
    
    .woocommerce .product-images .woocommerce-product-gallery__wrapper {
        display: flex !important;
        transition: transform 0.3s ease;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        transform: translateX(0%); /* Start at first image - JS will control this */
        touch-action: pan-x; /* Enable horizontal panning for swipe */
        will-change: transform; /* Optimize for transforms */
    }
    
    .woocommerce .product-images .woocommerce-product-gallery__image {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        position: relative;
        pointer-events: auto !important; /* Ensure touch events work */
        touch-action: pan-x; /* Enable horizontal panning */
    }
    
    .woocommerce .product-images .woocommerce-product-gallery__image img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 400px !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        box-sizing: border-box !important;
        margin: 0 auto;
        pointer-events: none; /* Let touch events pass through to wrapper */
        user-select: none; /* Prevent image selection during swipe */
        -webkit-user-select: none;
    }
    
    /* Hide thumbnails on mobile - show only main carousel */
    .woocommerce .product-images .flex-control-thumbs {
        display: none !important;
    }
    
    /* Carousel navigation dots */
    .woocommerce .product-images .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .woocommerce .product-images .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--line);
        border: none;
        cursor: pointer;
        padding: 0;
        transition: background 0.2s ease;
        flex-shrink: 0;
    }
    
    .woocommerce .product-images .carousel-dot.active {
        background: var(--brand);
    }
}

/* Desktop: keep thumbnails visible */
@media (min-width: 769px) {
    .woocommerce .product-images .flex-control-thumbs {
        display: flex !important;
        gap: 8px;
        margin-top: 16px;
        justify-content: flex-start;
    }
    
    .woocommerce .product-images .flex-control-thumbs img {
        border: 2px solid var(--line);
        background: #111;
        border-radius: 6px;
        width: 60px !important;
        height: 60px !important;
        object-fit: contain;
        cursor: pointer;
        transition: border-color 0.18s;
    }
    
    .woocommerce .product-images .flex-control-thumbs img.flex-active {
        border-color: var(--brand);
    }
    
    .woocommerce .product-images .carousel-dots {
        display: none;
    }
}

/* Long description block shown below product card */
.product-long-description {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-top: 22px;
}

.product-long-description .section-title {
    margin: 0 0 12px;
}

.product-long-description__content {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.7;
}

/* Reapply spacing fix: ensure injected payment buttons (GPay/Stripe) never sit flush
   with the quantity controls (+/-) or add-to-cart button. These rules are high-specificity
   fallbacks and use !important where necessary to override third-party inline styles. */
.woocommerce div.product form.cart .quantity {
    margin-right: 14px !important; /* space between quantity and following elements */
}
.woocommerce div.product form.cart .quantity .qty {
    min-width: 56px !important; /* avoid collapse when buttons injected */
}
.woocommerce div.product form.cart .gpay-button,
.woocommerce div.product form.cart [id*="gpay"],
.woocommerce div.product form.cart [class*="gpay"] {
    margin-left: 12px !important;
    display: inline-block !important;
}
.woocommerce div.product form.cart + * { margin-top: 8px !important; }

/* Additional hard spacing to guarantee a clear gap after the cart form.
   This covers cases where the payment widget is injected inside or after the form. */
.woocommerce div.product form.cart {
    margin-bottom: 8px !important; /* small buffer to prevent overlap */
    padding-bottom: 8px !important;
}
.woocommerce div.product form.cart + *,
.woocommerce div.product form.cart ~ * {
    margin-top: 8px !important;
}
.woocommerce div.product .single_add_to_cart_button {
    margin-bottom: 6px !important; /* small breathing room before injected widgets */
}

/* Extra fallback: if a payment iframe is placed directly after the form */
.woocommerce div.product form.cart + iframe,
.woocommerce div.product form.cart + div > iframe {
    margin-top: 8px !important;
}


/* =======================================================================
   CART PAGE STYLING
======================================================================= */

.woocommerce-cart-form {
    width: 100%;
}

.woocommerce-cart-form .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.woocommerce-cart-form .shop_table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-cart-form .shop_table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.woocommerce-cart-form .shop_table .product-remove a {
    color: var(--text-muted);
    font-size: 24px;
    text-decoration: none;
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.woocommerce-cart-form .shop_table .product-remove a:hover {
    background: var(--brand);
    color: var(--brand-ink);
}

.woocommerce-cart-form .shop_table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
}

.woocommerce-cart-form .shop_table .product-name a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.woocommerce-cart-form .shop_table .product-name a:hover {
    color: var(--brand);
}

.woocommerce-cart-form .shop_table .product-price,
.woocommerce-cart-form .shop_table .product-subtotal {
    color: var(--brand);
    font-weight: 700;
}

.woocommerce-cart-form .actions {
    padding: 20px 0;
}

.woocommerce-cart-form .coupon {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.woocommerce-cart-form .coupon label {
    color: var(--ink);
    font-weight: 600;
}

.woocommerce-cart-form .coupon input[type="text"] {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    flex: 1;
    min-width: 200px;
}

.woocommerce-cart-form .coupon button,
.woocommerce-cart-form .button {
    background: var(--brand);
    color: var(--brand-ink);
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-cart-form .coupon button:hover,
.woocommerce-cart-form .button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cart-collaterals {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.woocommerce .cart_totals {
    background: var(--panel);
    padding: 24px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.woocommerce .cart_totals h2 {
    color: var(--ink);
    font-size: 24px;
    margin-bottom: 20px;
}

.woocommerce .cart_totals table {
    width: 100%;
    margin-bottom: 20px;
}

.woocommerce .cart_totals table th,
.woocommerce .cart_totals table td {
    padding: 12px 0;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.woocommerce .cart_totals table th {
    text-align: left;
    font-weight: 600;
}

.woocommerce .cart_totals table td {
    text-align: right;
    font-weight: 700;
}

.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td {
    color: var(--brand);
    font-size: 20px;
    border-bottom: none;
    padding-top: 20px;
}

.woocommerce .wc-proceed-to-checkout {
    margin-top: 20px;
}

.woocommerce .wc-proceed-to-checkout .checkout-button {
    background: var(--brand);
    color: var(--brand-ink);
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 18px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    /* Ensure the checkout button hover explicitly keeps the brand background and dark text */
    background: var(--brand);
    color: var(--brand-ink);
}

.woocommerce .cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.woocommerce .cart-empty .return-to-shop {
    display: inline-block;
    margin-top: 20px;
    background: var(--brand);
    color: var(--brand-ink);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woocommerce .cart-empty .return-to-shop:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .woocommerce-cart-form .shop_table {
        font-size: 14px;
    }
    
    .woocommerce-cart-form .shop_table thead {
        display: none;
    }
    
    .woocommerce-cart-form .shop_table tbody tr {
        display: block;
        margin-bottom: 24px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px;
        background: var(--bg-secondary);
    }
    
    .woocommerce-cart-form .shop_table tbody td {
        display: block;
        text-align: right;
        padding: 8px 0;
        border-bottom: none;
    }
    
    .woocommerce-cart-form .shop_table tbody td:before {
        content: attr(data-title);
        float: left;
        font-weight: 700;
        color: var(--text-primary);
    }
    
    .woocommerce-cart-form .shop_table .product-remove {
        text-align: right;
    }
    
    .woocommerce-cart-form .shop_table .product-thumbnail {
        text-align: center;
    }
    
    .woocommerce-cart-form .coupon {
        flex-direction: column;
        align-items: stretch;
    }
    
    .woocommerce-cart-form .coupon input[type="text"] {
        width: 100%;
    }
}

/* ===============================
   InPost / EasyPack – Dark Theme Fix
   =============================== */

/* Main wrappers used by InPost */
.inpost_pl_selected_point_data_wrap,
#inpost_pl_checkout_validation_modal > div,
.easypack_selected_point_data,
.easypack-widget,
.easypack-widget * {
  color: #0b0d10 !important; /* fallback for inner elements */
}

/* Proper dark panel styling */
.inpost_pl_selected_point_data_wrap,
#inpost_pl_checkout_validation_modal > div,
.easypack_selected_point_data {
  background: #11141a !important; /* your --panel */
  border: 1px solid #1c2027;      /* your --line */
  border-radius: 12px;
  padding: 14px 16px;
  color: #e9eef7 !important;      /* your --ink */
}

/* IDs and address text */
#selected-parcel-machine-id {
  font-weight: 800;
  color: #9BEC6A !important;      /* brand green */
  margin-bottom: 4px;
}

#selected-parcel-machine-desc,
#selected-parcel-machine-desc1 {
  color: #e9eef7 !important;
  opacity: 0.9;
}

/* Any inline <br> spacing cleanup */
.easypack_selected_point_data br {
  content: "";
  display: block;
  margin-bottom: 4px;
}

/* Modal inner box: black background + red outline */
#inpost_pl_checkout_validation_modal > div {
    background-color: #000 !important;  /* black background */
    color: #fff !important;             /* white text */
    outline: 2px solid red !important;  /* red outline */
    box-shadow: rgba(255, 255, 255, 0.1) 0px 4px 10px !important; /* optional light shadow */
}

/* Modal text to white */
#inpost_pl_checkout_validation_modal > div div {
    color: #fff !important;
}

/* Close "×" button white */
#inp_pl_close_modal_cross {
    color: #fff !important;
}

/* "Ok" button styling */
#inp_pl_close_modal_button {
    background-color: #ffa900 !important; /* orange for contrast */
    color: #000 !important;               /* black text */
}

/* Increase image size on the checkout page */
.woocommerce-checkout img {
    width: 150px;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

/* Force image size adjustments in the checkout order summary */
.wc-block-components-order-summary-item__image img {
    width: 150px !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Ensure parent containers do not restrict image size */
.wc-block-components-order-summary-item__image {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Adjust layout for order summary items */
.wc-block-components-order-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wc-block-components-order-summary-item__image {
    margin-bottom: 10px;
}

.wc-block-components-order-summary-item__description {
    margin-top: 10px;
}

.wc-block-components-order-summary-item__total-price {
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Adjust textarea size in the WooCommerce checkout */
.wc-block-components-textarea {
    height: 100px !important; /* Increase height */
    line-height: 1.5 !important; /* Adjust line height for better readability */
    resize: vertical; /* Allow users to resize vertically */
}

/* Ensure styles apply dynamically when dropdown becomes visible */
#payment-bankInput {
    position: relative;
    z-index: 1;
    background: #fff !important; /* Ensure a clean background */
    color: #333 !important; /* Set a clear text color */
    text-indent: 0 !important;
}

/* Hide placeholder-like text dynamically */
.p-Select-select.Input--placeholder::before {
    content: none !important;
}

/* Style the disabled option */
#payment-bankInput option[disabled] {
    color: #999 !important;
    font-style: italic;
}

/* Ensure dropdown is styled when visible */
.p-Select-select {
    display: block !important;
    visibility: visible !important;
}


