.oaed-stock-block{display:inline-block;padding:8px 14px;border-radius:6px;font-size:14px;font-weight:600;margin:10px 0 14px;line-height:1.4;}
.oaed-stock-block.oaed-ok{background:#e6f7ec;color:#0d6f2a;border:1px solid #a8e0bb;}
.oaed-stock-block.oaed-low{background:#fff4e0;color:#a55b00;border:1px solid #f0c780;animation:oaedPulse 1.6s ease-in-out infinite;}
.oaed-stock-block.oaed-out{background:#fbecec;color:#8a1f1f;border:1px solid #e6a2a2;}
@keyframes oaedPulse{0%,100%{opacity:1;}50%{opacity:.75;}}
.stock.in-stock.low-stock{color:#a55b00;font-weight:600;}

/* ──────────────────────────────────────────
   AliDirect — Description "View More" styles
   ────────────────────────────────────────── */

/* Smooth height transition on the description content wrapper */
.oaed-desc-content {
    transition: max-height 0.45s ease;
    will-change: max-height;
    position: relative;
}

/* Fade-out gradient at the bottom when truncated */
.oaed-desc-fade {
    display: block;
    position: absolute;
    bottom: 50px; /* room for the button */
    left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #fff 85%);
    pointer-events: none;
    z-index: 2;
}

.oaed-desc-truncated .oaed-desc-fade {
    display: block;
}

.oaed-desc-expanded .oaed-desc-fade,
.oaed-desc-content:not([style*="max-height"]) ~ .oaed-desc-fade {
    display: none;
}

/* The View More / View Less button */
.oaed-view-more-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0 16px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 3;
    position: relative;
}

.oaed-view-more-btn:hover {
    background: #eee;
    border-color: #bbb;
    color: #000;
}

.oaed-view-more-btn:active {
    background: #e0e0e0;
}

/* Make sure the panel is positioned so fade/button anchor correctly */
.woocommerce-Tabs-panel--description {
    position: relative;
}

/* ── Header icons (person / wishlist / cart) ── */
.oaed-header-icons{display:inline-flex;align-items:center;gap:12px;margin-left:auto;}
.oaed-hicon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;color:#fff;text-decoration:none;transition:opacity .2s;}
.oaed-hicon:hover{opacity:.75;color:#fff;}
.oaed-cart-icon{position:relative;}
.oaed-cart-badge{position:absolute;top:-7px;right:-10px;background:#e74c3c;color:#fff;font-size:10px;font-weight:700;min-width:17px;height:17px;line-height:17px;text-align:center;border-radius:50%;padding:0 3px;}
@media(max-width:768px){.oaed-header-icons{gap:8px;}}

/* ===== Responsive header: keep "SHOPAM LONDON" on ONE line + fit the icons ===== */
/* The theme caps the logo at 50% width and lets it wrap onto two lines; undo that. */
a.custom-logo-text{white-space:nowrap!important;}
.navbar .header-logo-wrapper{flex-wrap:nowrap!important;max-width:none!important;}

/* Scale the title down on smaller screens so the whole header fits on one row. */
@media (max-width:1024px){
	a.custom-logo-text{font-size:clamp(15px,4.6vw,26px)!important;line-height:1.15!important;}
	.navbar .header-inner{gap:8px;}
	.oaed-header-icons{gap:8px!important;}
}
@media (max-width:600px){
	a.custom-logo-text{font-size:clamp(13px,4.4vw,20px)!important;}
	.oaed-header-icons{gap:6px!important;}
	.oaed-hicon{width:22px!important;height:22px!important;}
	.oaed-hicon svg{width:20px!important;height:20px!important;}
}
@media (max-width:380px){
	a.custom-logo-text{font-size:12px!important;}
	.oaed-header-icons{gap:4px!important;}
	.oaed-hicon{width:20px!important;height:20px!important;}
	.oaed-hicon svg{width:18px!important;height:18px!important;}
}

/* ==========================================================================
   Custom Pro Product Loop Redesign — Photo, Button, Title then Price
   ========================================================================== */

/* Flexbox rearrangement for the product card */
li.wp-block-post {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    padding-bottom: 20px !important;
}

/* 1. Image Container */
.wc-block-components-product-image {
    order: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background-color: #f7f7f7 !important;
    transition: box-shadow 0.3s ease !important;
    margin-bottom: 8px !important;
}

.wc-block-components-product-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

li.wp-block-post:hover .wc-block-components-product-image img {
    transform: scale(1.05) !important;
}

li.wp-block-post:hover .wc-block-components-product-image {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* 2. Action Button (directly below photo) */
.wp-block-woocommerce-product-button {
    order: 2 !important;
    position: static !important;
    opacity: 1 !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    display: block !important;
    width: 100% !important;
}

/* Pro Pill Button Styling */
.wp-block-button__link.wc-block-components-product-button__button {
    background-color: #111 !important;
    color: #fff !important;
    border-radius: 50px !important; /* Pill shape */
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease !important;
    display: block !important;
    text-align: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    width: 100% !important;
    margin: 0 !important;
}

.wp-block-button__link.wc-block-components-product-button__button:hover {
    background-color: #000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transform: translateY(-1px) !important;
}

/* 3. Product Price (aligned horizontally directly below action button) */
.wp-block-group {
    order: 3 !important;
    margin-top: 10px !important; /* Fixed margin to line them all up horizontally */
    margin-bottom: 2px !important;
    padding-top: 0 !important;
}

.wp-block-woocommerce-product-price {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wc-block-components-product-price {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* 4. Product Title (directly below price) */
h2.wp-block-post-title {
    order: 4 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    padding-top: 2px !important;
}

h2.wp-block-post-title a {
    color: #222 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

h2.wp-block-post-title a:hover {
    color: #000 !important;
}

/* ==========================================================================
   Mobile Grid Layout — 2 Columns on Mobile Devices
   ========================================================================== */
@media (max-width: 767px) {
    /* Force 2 columns grid for query loop and WC block grids */
    ul.wp-block-post-template.is-layout-grid,
    ul.wc-block-grid__products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Adjust padding and spacing on the product card for compact mobile view */
    li.wp-block-post {
        padding-bottom: 12px !important;
    }

    /* Tighten image margin on mobile */
    .wc-block-components-product-image {
        margin-bottom: 6px !important;
    }

    /* Make action button more compact on mobile to prevent layout clipping */
    .wp-block-woocommerce-product-button {
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .wp-block-button__link.wc-block-components-product-button__button {
        font-size: 11px !important;
        font-weight: 700 !important;
        padding: 6px 8px !important;
        letter-spacing: 0.2px !important;
    }

    /* Spacing around price block on mobile */
    .wp-block-group {
        margin-top: 6px !important;
        margin-bottom: 2px !important;
    }

    .wc-block-components-product-price {
        font-size: 12px !important;
    }

    /* Compact title style on mobile */
    h2.wp-block-post-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        padding-top: 2px !important;
    }
}

