/*
 Theme Name: Storefront Child
 Theme URI: https://shredder2u.com.my
 Description: Child theme for Storefront
 Author: Eddy
 Author URI: https://shredder2u.com.my
 Template: storefront
 Version: 1.0.0
*/

/* =============================================================
   TABLE OF CONTENTS
   1.  Site Header & Navigation
   2.  WooCommerce Lightbox
   3.  Mobile Search
   4.  Product Grid — 2 Column Mobile Layout
   5.  Product Card — Add to Cart Button Alignment
   6.  Product Titles
   7.  Sale Badge
   8.  Backorder Styling
   9.  Product Tabs
   10. Page-Specific Overrides (About Page)
   11. Sidebar & Content Width
   12. Search Field Styling
   13. Product Bundles
   14. Brands Page
   15. Add-on / PAO Fields
   ============================================================= */


/* =============================================================
   1. SITE HEADER & NAVIGATION
   ============================================================= */

.site-header {
    padding-top: 1px;
}

#masthead.site-header {
    padding-bottom: 0;
}

.main-navigation {
    padding-top: 0;
}

.storefront-primary-navigation {
    margin-top: 10px;
    margin-bottom: 8px;
}

.site-header .custom-logo-link img {
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: 60px;
    margin-right: 10px;
}

.site-branding,
.site-search,
.site-header-cart,
.site-logo-anchor {
    margin-bottom: 0;
    padding-bottom: 0;
}

.woocommerce-active .site-header .site-header-cart {
    padding-top: 0;
}

.site-main {
    margin-bottom: 0;
}

.woa-top-bar-wrap {
    padding-bottom: 0;
    margin-bottom: 0;
    height: 35px;
}


/* =============================================================
   2. WOOCOMMERCE LIGHTBOX
   Make product image zoom always appear above the header
   ============================================================= */

.pswp,
.pswp__bg,
.pswp__scroll-wrap {
    z-index: 999999 !important;
}


/* =============================================================
   3. MOBILE SEARCH
   ============================================================= */

@media screen and (max-width: 768px) {
    .site-search {
        display: block !important;
    }
}


/* =============================================================
   4. PRODUCT GRID — 2 COLUMN MOBILE LAYOUT
   ============================================================= */

ul.products li.product {
    width: 46.411765%;
    float: left;
    margin-right: 5.8823529412%;
}

ul.products li.product:nth-of-type(2n) {
    margin-right: 0;
}

@media (min-width: 768px) {
    ul.products li.product:nth-of-type(2n) {
        margin-right: 5.8823529412%;
    }
}


/* =============================================================
   5. PRODUCT CARD — ADD TO CART BUTTON ALIGNMENT
   ============================================================= */

li.type-product a:first-child {
    min-height: 345px;
    display: block;
}


/* =============================================================
   6. PRODUCT TITLES
   ============================================================= */

.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
    font-weight: 600;
}


/* =============================================================
   7. SALE BADGE
   ============================================================= */

.onsale {
    background-color: #ffffff;
    border-color: #ff0000;
    color: #ff0000;
}

ul.products li.product .onsale {
    position: absolute;
    top: 120px;
    right: 40px;
}


/* =============================================================
   8. BACKORDER STYLING
   ============================================================= */

.woocommerce div.product p.stock.available-on-backorder,
.woocommerce ul.products li.product .available-on-backorder {
    background: #ffe7cc;
    color: #cc5500;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 700;
}


/* =============================================================
   9. PRODUCT TABS
   ============================================================= */

.product .woocommerce-tabs ul.tabs {
    width: 100%;
    float: none;
    margin-right: 5.8823529412%;
    border: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0 0 0 1em;
    margin: 0 0 1.618em;
    overflow: hidden;
    position: relative;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    position: absolute;
    content: ' ';
    width: 100%;
    bottom: 0;
    left: 0;
    border-bottom: 1px solid #d3ced2;
    z-index: 1;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: 1px solid #d3ced2;
    background-color: #ebe9eb;
    display: inline-block;
    position: relative;
    z-index: 0;
    border-radius: 4px 4px 0 0;
    margin: 0 -5px;
    padding: 0 1em;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: #fff;
    z-index: 2;
    border-bottom-color: #fff;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::after,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before {
    border: 1px solid #d3ced2;
    position: absolute;
    bottom: -1px;
    width: 0;
    height: 0;
    content: ' ';
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before {
    left: -6px;
    border-bottom-right-radius: 4px;
    border-width: 0 1px 1px 0;
    box-shadow: 2px 2px 0 #ebe9eb;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active::before {
    box-shadow: 2px 2px 0 #fff;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    right: -6px;
    border-bottom-left-radius: 4px;
    border-width: 0 0 1px 1px;
    box-shadow: -2px 2px 0 #ebe9eb;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active::after {
    box-shadow: -2px 2px 0 #fff;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: .5em 0;
    font-weight: 700;
    color: #515151;
    text-decoration: none;
    outline: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: inherit;
    text-shadow: inherit;
}

.wc-tab {
    float: none !important;
    width: 100% !important;
}


/* =============================================================
   10. PAGE-SPECIFIC OVERRIDES (ABOUT PAGE)
   ============================================================= */

.page-id-8347 .woocommerce-breadcrumb {
    display: none;
}

.page-id-8347 .entry-title {
    display: none !important;
}


/* =============================================================
   11. SIDEBAR & CONTENT WIDTH
   ============================================================= */

@media screen and (min-width: 480px) {
    .right-sidebar .content-area {
        width: 82%;
        float: left;
        margin-right: 2%;
    }

    .right-sidebar .widget-area {
        width: 15%;
        float: right;
        margin-right: 1%;
    }

    .storefront-full-width-content .content-area {
        width: 100%;
        float: left;
        margin-left: 0;
        margin-right: 0;
    }
}

@media screen and (max-width: 600px) {
    .right-sidebar .widget-area {
        display: none !important;
    }
}


/* =============================================================
   12. SEARCH FIELD STYLING
   ============================================================= */

.site-header .site-search .search-field {
    border-radius: 25px;
    background-color: #111;
    border: 1px solid #ccc;
    width: 150px;
    transition: all 0.3s ease;
}

.site-header .site-search .search-field:focus {
    background-color: #fff;
    border-color: #007cba;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.site-header .site-search .search-submit {
    display: none;
}

@media (max-width: 767px) {
    .site-header .site-search {
        display: flex !important;
        justify-content: flex-end !important;
        background-color: transparent !important;
    }

    .site-header .site-search form {
        width: 80% !important;
        display: flex !important;
        justify-content: flex-end !important;
        background-color: transparent !important;
    }
}


/* =============================================================
   13. PRODUCT BUNDLES
   ============================================================= */

.bundle_price {
    color: darkred;
}

.bundle_form div.bundled_product_summary {
    padding-bottom: 0em !important;
    margin-bottom: 0em;
    border: 0px solid rgba(0, 0, 0, 0.08);
    padding-left: 0;
}

@media screen and (max-width: 480px) {
    .bundled_item_images_col {
        display: none !important;
    }

    .bundle_form div.bundled_product_summary .bundled_product_images {
        max-width: 30%;
    }
}


/* =============================================================
   14. BRANDS PAGE
   ============================================================= */

.pwb-brands-cols-outer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.pwb-brands-col3 {
    flex: 1 1 calc(25% - 20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pwb-brands-col3:hover {
    transform: translateY(-10px);
}

.pwb-brands-col3 img {
    width: 250px;
    height: auto;
    transition: opacity 0.3s ease;
}

.pwb-brands-col3:hover img {
    opacity: 0.8;
}

.pwb-brands-col3 p {
    padding: 20px;
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.pwb-brands-col3 a {
    color: inherit !important;
    text-decoration: none !important;
    border: none;
    background: transparent;
}

@media (max-width: 767px) {
    .pwb-brands-col3 {
        flex: 1 1 calc(50% - 10px);
    }

    .pwb-brands-col3 img {
        width: 100%;
    }
}


/* =============================================================
   15. ADD-ON / PAO FIELDS
   ============================================================= */

.wc-pao-subtotal-line {
    color: darkblue;
    font-weight: bolder;
}

.wc-pao-col1 {
    color: darkslateblue;
}

.wc-pao-col2 {
    color: darkslateblue;
}

.form-row-wide {
    width: 65%;
}