/*
Theme Name: Blocksy Child for Dinapala Group
Theme URI: https://dinapalagroup.lk/
Description: Blocksy Child Theme for Dinapala Group Shop
Author: Antigravity
Author URI: https://dinapalagroup.lk/
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

/* Add your custom CSS below this line */

:root {
  /* Client Brand Colors (MWS) */
  --dinapala-red: #E31E24; /* MWS vibrant red */
  --dinapala-blue: #23429B; /* MWS vibrant blue */
  --dinapala-dark: #222222;
}

/* Base structural adjustments for WooCommerce to match Dinapala */

/* Make add to cart buttons red by default, as is common for action buttons on the target site */
.woocommerce ul.products li.product .button, 
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background-color: var(--dinapala-red);
    color: #fff;
    border-radius: 4px;
}

.woocommerce ul.products li.product .button:hover, 
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background-color: #b51c14; /* Darker red on hover */
}

/* Category sidebar styling tweaks */
.widget_product_categories ul li a {
    color: var(--dinapala-dark);
    font-weight: 500;
}

.widget_product_categories ul li a:hover {
    color: var(--dinapala-red);
}

/* Product title color */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--dinapala-blue);
    font-size: 1.1em;
}

/* --- User Added Product Card Styling --- */

/* Force a Dense 6-Column Grid like Dinapala */
.woocommerce ul.products, .woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 15px !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
}

/* Tablet Layout */
@media (max-width: 1024px) {
    .woocommerce ul.products, .woocommerce-page ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Mobile Layout */
@media (max-width: 768px) {
    .woocommerce ul.products, .woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* Remove Gray Background from Product Images and Make them Uniformly Sized */
.woocommerce ul.products li.product .ct-image-container {
    background-color: transparent !important;
    padding: 0 !important;
    aspect-ratio: 1/1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    width: 100% !important;
    max-height: 200px !important; /* Limit height to make cards compact */
    margin-bottom: 2px !important;
}

.woocommerce ul.products li.product .ct-image-container img,
.woocommerce ul.products li.product a img {
    background-color: transparent !important;
    padding: 0 !important;
    aspect-ratio: 1/1 !important;
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 200px !important;
}


/* Turn Free Blocksy Cards into Dinapala-Style Retail Boxes */
.woocommerce ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    /* Sharp, clean border */
    padding: 10px !important; /* Reduced padding for compact look */
    /* Internal spacing inside the box */
    border-radius: 4px !important;
    /* Rugged, slightly rounded corner */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover Effect: Makes the box pop when a user hovers over a tool */
.woocommerce ul.products li.product:hover {
    border-color: var(--dinapala-blue) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Align Title and Price strictly to the Left */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .star-rating {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Make Product Titles Bold and Commercial */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important; /* Smaller text */
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.3;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
}

/* Style the Price Tag to stand out */
.woocommerce ul.products li.product .price {
    color: var(--dinapala-red) !important;
    /* Bold retail red price */
    font-size: 14px !important; /* Smaller price */
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

/* Fix spacing for the Add to Cart button at the bottom */
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
    padding: 8px 0 !important; /* Thinner button */
    font-size: 12px !important; /* Smaller button text */
    background-color: #f1f5f9 !important;
    /* Clean gray button */
    color: #334155 !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--dinapala-red) !important;
    /* Turns accent color on hover */
    color: #ffffff !important;
}


/* --- Header Styling (MWS Brand Colors) --- */

/* Main Header Row (Search Bar area) - Solid MWS Blue */
.ct-header [data-row*="middle"], .ct-header [data-row*="main"] {
    background: var(--dinapala-blue) !important;
}

/* Ensure icons and text in the main/top rows are white to contrast with blue */
.ct-header [data-row*="middle"] .ct-icon-container,
.ct-header [data-row*="middle"] a,
.ct-header [data-row*="middle"] svg,
.ct-header [data-row*="middle"] .ct-cart-icon,
.ct-header [data-row*="middle"] [data-id*="cart"] {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Fix Vertical Alignment between Menu and Search Bar */
.ct-header [data-row*="middle"] .menu {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.ct-header [data-row*="middle"] .menu > li {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.ct-header [data-row*="middle"] .menu > li > a {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}

/* Remove any hidden margins from WordPress formatting around the shortcode */
.ct-header [data-row*="middle"] p {
    margin: 0 !important;
    padding: 0 !important;
}

.dinapala-search-wrapper,
.dinapala-inline-search {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Ensure the cart badge (item count) is visible */
.ct-header [data-row*="middle"] .ct-cart-badge {
    background: var(--dinapala-red) !important;
    color: #ffffff !important;
}

/* Bottom Row (Category Menu) - Solid MWS Red */
.ct-header [data-row*="bottom"] {
    background: var(--dinapala-red) !important;
}

/* Stack icons above text for the menu items and make them white */
.ct-header [data-row*="bottom"] .menu > li > a {
    color: #ffffff !important;
    font-weight: 600;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    font-size: 11px !important; /* Even smaller text under icon */
    padding: 15px 10px !important;
}

/* Hide the default dropdown arrow icon Blocksy adds so it doesn't break alignment */
.ct-header [data-row*="bottom"] .menu > li > a > svg,
.ct-header [data-row*="bottom"] .menu > li > a > .ct-toggle-dropdown-desktop,
.ct-header [data-row*="bottom"] .menu > li > a > .ct-toggle-dropdown,
.ct-header [data-row*="bottom"] .menu > li > a::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

.ct-header [data-row*="bottom"] .menu > li > a:hover {
    color: #ffd7d7 !important; /* Light red/white on hover */
    background: rgba(0,0,0,0.1) !important; /* Subtle dark highlight */
}

/* Style and position for Font Awesome icons used in the menu */
.ct-header .menu > li > a i {
    margin-right: 0 !important;
    margin-bottom: 6px !important;
    font-size: 32px !important; /* Even larger icon */
    display: block !important;
}

/* Sub-category Dropdown Menu Styling */
.ct-header [data-row*="bottom"] .sub-menu {
    background-color: var(--dinapala-red) !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    padding: 10px 0 !important;
}

.ct-header [data-row*="bottom"] .sub-menu > li > a {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    transition: background 0.2s ease !important;
}

.ct-header [data-row*="bottom"] .sub-menu > li > a:hover {
    background-color: rgba(0,0,0,0.1) !important;
    color: #ffffff !important;
}

/* Style the custom inline search bar to be prominent like Dinapala */
.ct-header .dinapala-search-wrapper {
    width: 100%;
    max-width: 800px !important; /* Increased length */
    min-width: 400px !important; /* Force it to stay wide even next to a menu */
    margin: 0 auto;
}

.ct-header form.dinapala-inline-search {
    background: rgba(255, 255, 255, 0.15) !important; /* Translucent white creates a sleek lighter blue */
    border-radius: 50px !important; /* Pill shape for sleek design */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Soft transparent border */
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Style the new Right Search Icon */
.ct-header form.dinapala-inline-search .search-icon-right {
    color: #ffffff !important;
    font-size: 20px !important;
    margin-right: 20px !important;
    margin-left: -5px !important;
    opacity: 0.8 !important;
}

/* The actual input field where you type */
.ct-header form.dinapala-inline-search input[type="search"] {
    color: #ffffff !important;
    border: none !important;
    padding: 8px 15px !important; /* Reduced vertical padding to make pill thinner */
    flex-grow: 1 !important;
    background: transparent !important;
    box-shadow: none !important; 
    font-size: 14px !important; /* Slightly smaller text for sleek look */
    width: auto !important; 
    margin: 0 !important;
}

.ct-header form.dinapala-inline-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.ct-header form.dinapala-inline-search input[type="search"]:focus {
    outline: none !important;
}

/* Search button styling - Hidden as per user request */
.ct-header form.dinapala-inline-search button[type="submit"] {
    display: none !important;
}

.ct-header form.dinapala-inline-search button[type="submit"]:hover {
    background-color: var(--dinapala-red) !important;
}

/* Dropdown menu background and text */
.ct-header .sub-menu {
    background-color: #ffffff;
    border-top: 3px solid var(--dinapala-red);
}

.ct-header .sub-menu > li > a {
    color: var(--dinapala-dark) !important;
}

.ct-header .sub-menu > li > a:hover {
    color: var(--dinapala-red) !important;
    background-color: #f5f5f5;
}

/* ==========================================================================
   2. HERO SLIDER STYLING (MWS Brand - Full Width, Restricted Height)
   ========================================================================== */

.mws-hero-slider-container {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important; /* Flush against header */
    margin-bottom: 30px;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Prevent the 100vw from causing a horizontal scrollbar which creates white gaps */
body {
    overflow-x: hidden;
}

.mws-hero-swiper {
    width: 100%;
    height: auto;
}

.mws-hero-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mws-hero-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 450px !important; /* Force a strict height */
    object-fit: cover !important;
}

/* Adjust height for mobile so it doesn't look stretched */
@media (max-width: 768px) {
    .mws-hero-swiper .swiper-slide img {
        height: 250px !important;
    }
}


/* Slider Navigation Arrows - MWS Blue */
.mws-hero-swiper .swiper-button-next,
.mws-hero-swiper .swiper-button-prev {
    color: var(--dinapala-blue) !important;
    background: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mws-hero-swiper .swiper-button-next:hover,
.mws-hero-swiper .swiper-button-prev:hover {
    background: var(--dinapala-blue) !important;
    color: #ffffff !important;
}

.mws-hero-swiper .swiper-button-next:after,
.mws-hero-swiper .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* Slider Pagination Dots - MWS Red */
.mws-hero-swiper .swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.8;
    width: 10px;
    height: 10px;
}

.mws-hero-swiper .swiper-pagination-bullet-active {
    background: var(--dinapala-red) !important;
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================================================
   3. FOOTER STYLING (MWS Brand)
   ========================================================================== */

/* Main Footer Area (Widgets) - Solid MWS Blue */
.ct-footer,
.ct-footer [data-row]:not([data-row*="bottom"]) {
    background-color: var(--dinapala-blue) !important;
}

/* Ensure all text, links, widget titles, and SVGs in the main footer are white */
.ct-footer *:not([data-row*="bottom"]) {
    color: #ffffff;
}

.ct-footer [data-row]:not([data-row*="bottom"]) *,
.ct-footer svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Ensure specific icon containers (like social media) are visible and have a hover state */
.ct-footer .ct-socials a:hover,
.ct-footer .ct-socials a:hover svg {
    color: #ffd7d7 !important;
    fill: #ffd7d7 !important;
}

/* Add a red border to the very top of the entire footer */
.ct-footer {
    border-top: 4px solid var(--dinapala-red) !important;
}

/* Ensure all text, links, and widget titles in the main footer are white */
.ct-footer [data-row*="top"] *,
.ct-footer [data-row*="middle"] *,
.ct-footer [data-row*="main"] * {
    color: #ffffff !important;
}

/* Footer Link Hover State */
.ct-footer [data-row*="middle"] a:hover,
.ct-footer [data-row*="top"] a:hover {
    color: #ffd7d7 !important; /* Light red hover */
    text-decoration: underline !important;
}

/* Bottom Footer Row (Copyright Area) - Solid MWS Red */
.ct-footer [data-row*="bottom"] {
    background: var(--dinapala-red) !important;
    color: #ffffff !important;
    padding: 15px 0 !important;
}

/* Ensure copyright text and links are white */
.ct-footer [data-row*="bottom"] *,
.ct-footer [data-row*="bottom"] a {
    color: #ffffff !important;
}

.ct-footer [data-row*="bottom"] a:hover {
    color: #f5f5f5 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   4. WEEKLY DEALS CAROUSEL (MWS Brand)
   ========================================================================== */
.mws-weekly-deals-section {
    padding: 40px 0;
    margin: 20px auto;
    max-width: 1200px;
    width: 100%; /* Prevent container from shrinking to min-content */
}

.mws-deals-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.mws-deals-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dinapala-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mws-deals-header h2 i {
    color: var(--dinapala-red);
}

.mws-deal-card {
    position: relative;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%; /* Ensure card takes full slide width */
}

.mws-deal-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: rgba(227, 30, 36, 0.3); /* MWS Red glow */
}

/* The MWS "Deal!" Sticker */
.mws-deal-sticker {
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: var(--dinapala-red);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 15px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(227, 30, 36, 0.4);
    transform: rotate(-5deg); /* Playful retail angle */
}

.mws-deal-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
    aspect-ratio: 1/1; /* Keep images uniform */
}

.mws-deal-card .woocommerce-loop-product__title {
    font-size: 15px !important;
    color: var(--dinapala-dark) !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    text-align: center;
}

.mws-deal-card .price {
    font-size: 16px !important;
    color: var(--dinapala-red) !important;
    font-weight: 700 !important;
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.mws-deal-card .price del {
    color: #999 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-right: 8px;
}

.mws-deal-card .price ins {
    background: transparent !important;
    color: var(--dinapala-red) !important;
    text-decoration: none !important;
}

/* Footer of the card containing Price and Cart Button */
.mws-deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push to bottom */
}

/* Small Circular Add to Cart Button */
.mws-deal-card .mws-icon-cart-btn {
    background: var(--dinapala-dark) !important;
    color: #fff !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    min-height: unset !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
    margin: 0 !important;
}

.mws-deal-card .mws-icon-cart-btn i {
    font-size: 18px !important;
    margin: 0 !important;
}

.mws-deal-card .mws-icon-cart-btn:hover {
    background: var(--dinapala-red) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 5px 12px rgba(227, 30, 36, 0.3) !important;
}

/* Fix price alignment in flex container */
.mws-deal-card .price {
    margin-bottom: 0 !important;
    text-align: left !important;
}

.mws-deals-swiper {
    padding: 15px 10px 30px !important; /* Space for sticker and shadow */
}

.deals-next, .deals-prev {
    color: var(--dinapala-blue) !important; /* MWS Blue arrows */
    transform: scale(0.6);
    background: #fff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.deals-next { right: -10px !important; }
.deals-prev { left: -10px !important; }

/* ==========================================================================
   5. MWS DINAPALA-STYLE FOOTER WIDGETS
   ========================================================================== */

/* Target the Blocksy Footer Top Row Columns */
.ct-footer [data-row*="top"] .ct-footer-widget {
    margin-bottom: 30px;
}

/* Widget Titles - Uppercase, White, with short horizontal line */
.ct-footer-widget .widget-title {
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.ct-footer-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: #ffffff;
}

/* Footer Navigation Menus */
.ct-footer-widget ul.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ct-footer-widget ul.menu > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 0;
}

.ct-footer-widget ul.menu > li:last-child {
    border-bottom: none;
}

.ct-footer-widget ul.menu > li > a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: opacity 0.3s ease;
    display: block;
}

.ct-footer-widget ul.menu > li > a:hover {
    opacity: 0.7;
}

/* Center all content in Footer Column 1 */
.ct-footer [data-id="widget-area-1"] {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ct-footer [data-id="widget-area-1"] .ct-footer-widget {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Custom WhatsApp Button Style for HTML Widget */
.mws-footer-whatsapp {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
    background: transparent;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none !important;
    margin-top: 20px;
}

.mws-footer-whatsapp i {
    font-size: 40px;
}

.mws-footer-whatsapp:hover {
    opacity: 0.8;
}

/* ==========================================================================
   6. LATEST ARRIVALS CAROUSEL
   ========================================================================== */

/* The MWS Blue "New!" Sticker */
.mws-new-sticker {
    background-color: var(--dinapala-blue) !important;
    box-shadow: 0 4px 10px rgba(12, 64, 154, 0.4) !important;
}

.mws-arrivals-swiper {
    padding: 15px 10px 30px !important; /* Space for sticker and shadow */
}

.arrivals-next, .arrivals-prev {
    color: var(--dinapala-red) !important; /* MWS Red arrows to contrast with blue stickers */
    transform: scale(0.6);
    background: #fff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.arrivals-next { right: -10px !important; }
.arrivals-prev { left: -10px !important; }

/* ==========================================================================
   7. SHOP SIDEBAR STYLING
   ========================================================================== */

/* Reduce the width of the sidebar globally by overriding the Blocksy CSS variable */
:root {
    --sidebar-width: 22% !important;
}

/* Add a clean retail border around the entire sidebar */
aside#sidebar .ct-sidebar {
    border: 1px solid #eaeaea !important;
    border-radius: 8px !important;
    padding: 25px 20px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03) !important;
}

/* Clean up individual widget spacing inside the box (Supports both Legacy and Modern Blocks) */
aside#sidebar .widget,
aside#sidebar .wp-block-woocommerce-product-filters,
aside#sidebar .wp-block-group,
aside#sidebar .wc-block-product-categories {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 35px !important;
    box-shadow: none !important;
}

aside#sidebar .widget:last-child,
aside#sidebar > div > *:last-child {
    margin-bottom: 0 !important;
}

/* Make widget titles sleek and modern (Supports Legacy, Headings, and WooCommerce Panels) */
aside#sidebar .widget-title,
aside#sidebar h2,
aside#sidebar h3,
aside#sidebar h4,
aside#sidebar .wc-block-components-panel__button {
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: var(--dinapala-dark) !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #eaeaea !important;
    background: transparent !important;
}

/* ==========================================================================
   8. HERO SECTION STYLING (Dinapala Boxed Layout)
   ========================================================================== */

/* Apply this class to the hero block to perfectly match Dinapala's boxed style */
.mws-boxed-hero {
    max-width: 1200px !important;
    margin: 30px auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08) !important;
}

/* Restrict the height so it doesn't consume the entire screen on load */
.mws-boxed-hero,
.mws-boxed-hero img,
.mws-boxed-hero .wp-block-cover__image-background,
.mws-boxed-hero .stk-block-slider {
    max-height: 500px !important;
    object-fit: cover !important;
}

/* ==========================================================================
   9. CATEGORY PRODUCT GRID
   ========================================================================== */
   
.mws-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

@media (min-width: 640px) {
    .mws-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .mws-products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

.mws-category-grid-section {
    margin-bottom: 50px;
}

/* ==========================================================================
   10. GLOBAL SHOP GRID COLUMNS
   ========================================================================== */

/* Force 4 columns on desktop for all native shop pages and WooCommerce blocks */
@media (min-width: 1024px) {
    :root {
        --theme-product-columns: 4 !important;
    }
    
    .woocommerce ul.products,
    .wc-block-grid__products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ==========================================================================
   11. BRAND LOGO SLIDER
   ========================================================================== */

.mws-brand-slider-section {
    margin-bottom: 50px;
    position: relative;
    width: 100%;
}

.mws-brand-swiper {
    padding: 15px 5px 30px !important;
    position: relative;
    overflow: hidden;
}

.mws-brand-logo-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    height: 100px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

.mws-brand-logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.3s ease;
}

.mws-brand-logo-card:hover {
    border-color: var(--dinapala-red);
    box-shadow: 0 6px 18px rgba(223, 28, 36, 0.08);
}

.mws-brand-logo-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Fallback Text Logo when no thumbnail is uploaded */
.mws-brand-text-logo {
    font-size: 14px;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    transition: color 0.3s ease;
}

.mws-brand-logo-card:hover .mws-brand-text-logo {
    color: var(--dinapala-red);
}

/* Navigation Arrows specifically styled for Brand Slider */
.brand-next,
.brand-prev {
    color: var(--dinapala-red) !important;
    background: #ffffff;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    top: 50% !important;
    transform: translateY(-50%) scale(0.8);
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

.brand-next:after,
.brand-prev:after {
    font-size: 16px !important;
    font-weight: 800;
}

.brand-next:hover,
.brand-prev:hover {
    background: var(--dinapala-red);
    color: #ffffff !important;
    border-color: var(--dinapala-red);
}

.brand-next { right: -5px !important; }
.brand-prev { left: -5px !important; }

/* ==========================================================================
   12. SINGLE PRODUCT PAGE LAYOUT & IMAGE SIZE
   ========================================================================== */

/* Restrict the maximum height of the single product gallery image to keep it compact */
.single-product .woocommerce-product-gallery img {
    max-height: 480px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    width: auto !important;
}

/* Mobile single product gallery height restriction */
@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery img {
        max-height: 320px !important;
    }
}

/* On desktop, narrow the gallery column and widen the summary column */
@media (min-width: 1000px) {
    .single-product div.product {
        --product-gallery-width: 42% !important; /* Make the left column 42% instead of 50% */
    }
}


