/* ===================================================================
   GLOBAL CLEAN BUILD — Snack Strong Foods
   Polished + Stable
=================================================================== */

/* ---------------------------------------------------------------
   BASE RESET
---------------------------------------------------------------- */
body {
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    font-family: "Inter", Arial, sans-serif;
    color: #222;
}

h1, h2, h3, h4 {
    font-weight: 600;
    margin: 0 0 12px 0;
}

/* ===================================================================
   SSF HEADER
=================================================================== */

/* Hide Storefront default header entirely */
.site-header,
header.site-header,
.storefront-full-width-header .col-full,
.storefront-primary-navigation,
.storefront-secondary-navigation,
.storefront-product-search,
.storefront-header-cart {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#ssf-header {
    width: 100%;
    background: #1b2a4a;
    border-bottom: 2px solid #2c4a6e;
    padding: 10px 0;
    position: relative;
    z-index: 9999;
}

.ssf-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.ssf-logo img,
.ssf-logo-img {
    height: 52px !important;
    width: auto !important;
    display: block;
}

/* Nav — items_wrap '%3$s' outputs direct <a> tags, no ul/li */
.ssf-menu {
    display: flex !important;
    gap: 32px !important;
    align-items: center !important;
}

.ssf-menu a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    letter-spacing: 0.02em;
}

.ssf-menu a:hover {
    color: #f7941d !important;
}

/* Also handle if ul/li structure is present */
.ssf-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 32px !important;
    align-items: center !important;
}

.ssf-menu ul li { margin: 0 !important; padding: 0 !important; }
.ssf-menu ul li:before { display: none !important; content: none !important; }
.ssf-menu ul li a { color: #ffffff !important; text-decoration: none !important; font-weight: 600 !important; font-size: 15px !important; }
.ssf-menu ul li a:hover { color: #f7941d !important; }

/* ===================================================================
   PAGE CONTAINER
=================================================================== */
.ssf-page-wrap {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 28px;
}

.woocommerce,
.woocommerce-cart,
.woocommerce-account {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 28px;
}

.woocommerce-breadcrumb { display: none !important; }

/* ===================================================================
   FILTER BAR
=================================================================== */
.ssf-filter-bar {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssf-filter-bar select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* ===================================================================
   PRODUCT TABLE
=================================================================== */
.ssf-catalog-table {
    width: 100%;
    background: #ffffff;
    border-collapse: collapse;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.ssf-catalog-table th {
    background: #f4f4f4;
    padding: 14px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
}

.ssf-catalog-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.ssf-catalog-table tbody tr:hover { background: #f9f9f9; }

.ssf-catalog-table td img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.ssf-qty {
    width: 65px;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #bbb;
}

.ssf-check { width: 18px; height: 18px; }

/* ===================================================================
   BUTTONS
=================================================================== */
.ssf-btn {
    background: #7ac043 !important;
    color: #0e395b !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: inline-block;
}

.ssf-btn:hover { background: #5ca130 !important; }

button.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: #7CB343;
    border: 2px solid #E9B94A;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

button.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: #6AA03B;
    border-color: #d6a63f;
}

/* ===================================================================
   PAGINATION
=================================================================== */
.ssf-pagination {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.ssf-pagination a {
    margin-right: 10px;
    font-weight: 600;
    text-decoration: none;
    color: #2c3e50;
}

/* ===================================================================
   TABLE STYLING
=================================================================== */
table.shop_table {
    border: none;
    border-collapse: collapse;
    width: 100%;
}

table.shop_table th {
    background: #ffffff;
    font-weight: 700;
    color: #1F3157;
    border-bottom: 2px solid #E9B94A;
}

table.shop_table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

/* ===================================================================
   MY ACCOUNT LAYOUT
=================================================================== */

.woocommerce-account .woocommerce {
    display: flex;
    gap: 32px;
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 220px;
    width: 220px;
}

.woocommerce-MyAccount-content {
    flex: 1 1 auto;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li { margin-bottom: 10px; }

.woocommerce-MyAccount-navigation a {
    display: block;
    padding: 14px 18px;
    background: #1F3157;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.2s ease;
    width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
}

.woocommerce-MyAccount-navigation a:hover { background: #25406F; }

.woocommerce-MyAccount-navigation li.is-active a {
    background: #7CB343 !important;
    color: #ffffff !important;
    border-color: #E9B94A !important;
}

.woocommerce-MyAccount-navigation ul li:before {
    display: none !important;
    content: none !important;
}

.ssf-dashboard-box,
.woocommerce-account .woocommerce form,
.woocommerce-Addresses {
    background: #ffffff;
    border: 2px solid #E9B94A;
    border-radius: 10px;
    padding: 25px 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.woocommerce-MyAccount-content h2,
.ssf-dashboard-title {
    color: #1F3157;
    font-weight: 700;
    margin-bottom: 20px;
}

.woocommerce-Addresses .woocommerce-Address {
    background: #ffffff;
    border: 2px solid #E9B94A;
    border-radius: 10px;
    padding: 20px;
}

@media (max-width: 900px) {
    .woocommerce-account .woocommerce { flex-direction: column; }
    .woocommerce-MyAccount-navigation { width: 100%; flex: none; }
}

/* ===================================================================
   INPUT FIELDS
=================================================================== */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 10px;
    font-size: 15px;
}

/* ===================================================================
   CART
=================================================================== */

@media (min-width: 960px) {
    body.woocommerce-cart .woocommerce {
        display: flex;
        align-items: flex-start;
        gap: 32px;
    }

    body.woocommerce-cart form.woocommerce-cart-form {
        flex: 1 1 auto;
        margin: 0;
        float: none;
    }

    body.woocommerce-cart .cart-collaterals {
        flex: 0 0 400px;
        max-width: 560px;
        margin: 0;
        float: none;
    }

    body.woocommerce-cart .site-content,
    body.woocommerce-cart .site-main,
    body.woocommerce-cart .col-full {
        max-width: 1400px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

body.woocommerce-cart .cart-collaterals .cart_totals,
body.woocommerce-cart .cart-collaterals .shipping_calculator {
    width: 100% !important;
    float: none !important;
}

body.woocommerce-cart td.actions .button { display: none !important; }

/* ===================================================================
   CHECKOUT
=================================================================== */

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row {
    margin-bottom: 6px !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper label,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper label {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper input.input-text,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper input.input-text,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper select,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper select {
    font-size: 12px !important;
    padding: 3px 6px !important;
    height: 26px !important;
    min-height: 26px !important;
    box-sizing: border-box;
}

body.woocommerce-checkout #billing_country_field,
body.woocommerce-checkout #shipping_country_field { display: none !important; }

@media (min-width: 769px) {
    body.woocommerce-checkout #billing_city_field,
    body.woocommerce-checkout #shipping_city_field { width: 45%; float: left; margin-right: 2%; }

    body.woocommerce-checkout #billing_state_field,
    body.woocommerce-checkout #shipping_state_field { width: 20%; float: left; margin-right: 2%; }

    body.woocommerce-checkout #billing_postcode_field,
    body.woocommerce-checkout #shipping_postcode_field { width: 30%; float: left; }
}

/* ===================================================================
   MY ACCOUNT – ORDERS TABLE
=================================================================== */

.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders {
    width: 100% !important;
    table-layout: auto !important;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders th:nth-child(1),
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders td:nth-child(1) { width: 12% !important; }
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders th:nth-child(2),
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders td:nth-child(2) { width: 20% !important; }
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders th:nth-child(3),
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders td:nth-child(3) { width: 28% !important; white-space: nowrap; }
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders th:nth-child(4),
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders td:nth-child(4) { width: 18% !important; }
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders th:nth-child(5),
.woocommerce-account .woocommerce-MyAccount-content table.shop_table.my_account_orders td:nth-child(5) { width: 22% !important; }

.woocommerce-account table.shop_table.my_account_orders td.woocommerce-orders-table__cell-order-actions .button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    text-align: center;
}

.woocommerce-account table.shop_table.my_account_orders td.woocommerce-orders-table__cell-order-actions .button:last-child {
    margin-bottom: 0 !important;
}

/* ===================================================================
   HIDE EMPTY NOTICES
=================================================================== */
.woocommerce-notices-wrapper:empty,
.woocommerce-account .woocommerce-notices-wrapper { display: none !important; }

/* ===================================================================
   MY ACCOUNT – VIEW ORDER
=================================================================== */

.woocommerce-account .woocommerce-MyAccount-content .ssf-view-order-box,
.woocommerce-account .woocommerce-MyAccount-content .ssf-items-box,
.woocommerce-account .woocommerce-MyAccount-content .ssf-totals-box,
.woocommerce-account .woocommerce-MyAccount-content .ssf-address-grid,
.woocommerce-account .woocommerce-MyAccount-content .ssf-payment-box {
    width: 100% !important;
    max-width: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-address-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-address-grid .ssf-address-box { flex: 1 1 48%; }

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content .ssf-address-grid .ssf-address-box { flex: 1 1 100%; }
}

/* ===================================================================
   MY ACCOUNT – DASHBOARD RECENT ORDERS
=================================================================== */

.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box.ssf-dashboard {
    width: 100% !important;
    max-width: 1200px !important;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box .ssf-recent-orders {
    width: 100% !important;
    table-layout: auto !important;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box .ssf-recent-orders th:nth-child(3),
.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box .ssf-recent-orders td:nth-child(3) {
    width: 26% !important;
    white-space: nowrap !important;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box .ssf-recent-orders td:nth-child(5) .button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    text-align: center;
    border-radius: 4px;
}

.woocommerce-account .woocommerce-MyAccount-content .ssf-dashboard-box .ssf-recent-orders td:nth-child(5) .button:last-child {
    margin-bottom: 0 !important;
}

/* Remove sidebar on catalog page */
body.page-id-9353 #secondary,
body.page-id-9353 .widget-area {
    display: none !important;
}

body.page-id-9353 #primary,
body.page-id-9353 .content-area {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Hide Storefront masthead completely */
#masthead {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* CATALOG LAYOUT FIX — page-id-9353 */
body.page-id-9353 #secondary.widget-area,
body.page-id-9353 .widget-area {
    display: none !important;
    width: 0 !important;
}

body.page-id-9353 #primary.content-area,
body.page-id-9353 #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.page-id-9353 #content .col-full,
body.page-id-9353 #content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide ALL Storefront headers */
#masthead,
.site-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}
