/*
Theme Name: Amahlosi Storefront Child
Theme URI: https://amahlosiculturalmusic.co.za/
Description: Custom WooCommerce child theme for Amahlosi Cultural Music store.
Author: Simple Perfect Solutions
Template: storefront
Version: 1.0.0
Text Domain: amahlosi-storefront-child
*/

:root {
    --brand-brown: #4a2316;
    --brand-dark: #2a130c;
    --brand-tan: #c89a5c;
    --brand-cream: #f7f1e8;
    --brand-text: #3b241b;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7f1e8;
    color: var(--brand-text);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.woocommerce-products-header__title {
    font-family: 'Cinzel', serif;
}

a {
    color: var(--brand-brown);
}

a:hover {
    color: #7a4428;
}

/* Header */
.site-header {
    background: #f3eee6;
    border-bottom: 3px solid #c89455;
}

.site-branding img {
    max-width: 180px;
    height: auto;
}

/* Navigation */
.main-navigation ul li a,
.site-header-cart .cart-contents {
    color: var(--brand-brown);
    font-weight: 600;
}

.main-navigation ul li a:hover {
    color: #7a4428;
}

/* Buttons */
button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.added_to_cart {
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%) !important;
    color: #2c180f !important;
    border-radius: 999px !important;
    border: 0 !important;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(74, 35, 22, 0.14);
}

button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.added_to_cart:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%) !important;
    color: #2c180f !important;
}

/* Product cards */
ul.products li.product {
    background: #fffaf4;
    border-radius: 20px;
    padding: 18px !important;
    box-shadow: 0 12px 28px rgba(74, 35, 22, 0.08);
    transition: 0.25s ease;
}

ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(74, 35, 22, 0.14);
}

ul.products li.product img {
    border-radius: 16px;
}

ul.products li.product .woocommerce-loop-product__title {
    color: var(--brand-brown);
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

.price {
    color: #7a4428 !important;
    font-weight: 800;
}

/* Single product */
.single-product div.product {
    background: #fffaf4;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 12px 30px rgba(74, 35, 22, 0.08);
}

.single-product div.product .product_title {
    color: var(--brand-brown);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--brand-brown);
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
    background-color: var(--brand-brown);
    color: #fff;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #4b2418 0%, #2f160f 100%);
    color: #fff;
}

.site-footer a {
    color: #f3d2a0;
}

/* Remove duplicate title/tagline */
.site-branding .site-title,
.site-branding .site-description {
    display: none !important;
}

/* =========================
   HEADER STYLE
========================= */

.site-header {
    background: #f3eee6;
    border-bottom: 3px solid #c89455;
    padding: 12px 0;
}

/* Logo */
.site-branding img {
    max-height: 80px;
    width: auto;
}

/* Navigation */
.main-navigation ul.menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-navigation ul.menu li a {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #4a2316;
}

.main-navigation ul.menu li a:hover {
    color: #7a4428;
}

/* Center alignment */
.site-header .col-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 767px) {
    .site-header {
        padding: 10px 0;
    }

    .site-branding img {
        max-height: 60px;
    }
}


/* =========================
   AMAHLOSI SHOP HEADER
========================= */

.site-header {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.amahlosi-shop-header {
    background: #f3eee6;
    border-bottom: 1px solid rgba(74, 35, 22, 0.12);
    position: relative;
}

.amahlosi-shop-header::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: -1px;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #7a4428, #c89455, #7a4428);
}

.amahlosi-shop-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 125px;
    gap: 30px;
}

.amahlosi-shop-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.amahlosi-shop-logo img,
.amahlosi-shop-logo .custom-logo {
    width: auto;
    height: auto;
    display: block;
    max-width: 190px;
}

.amahlosi-shop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    flex-wrap: wrap;
}

.amahlosi-shop-nav a {
    color: #4a2316;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    position: relative;
}

.amahlosi-shop-nav a:hover {
    color: #7a4428;
}

.amahlosi-shop-nav a:not(.amahlosi-book-btn)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: #c89455;
    transition: 0.25s ease;
}

.amahlosi-shop-nav a:not(.amahlosi-book-btn):hover::after {
    width: 100%;
}

.amahlosi-book-btn {
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%);
    color: #2c180f !important;
    padding: 14px 26px;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(74, 35, 22, 0.16);
}

.amahlosi-book-btn:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%);
    color: #2c180f !important;
}

/* Hide possible duplicate Storefront branding leftovers */
.site-branding,
.site-search,
.site-header-cart,
.storefront-primary-navigation {
    display: none !important;
}

/* Mobile */
@media (max-width: 991px) {
    .amahlosi-shop-header-inner {
        flex-direction: column;
        align-items: center;
        padding: 18px 0;
        min-height: auto;
    }

    .amahlosi-shop-logo img,
    .amahlosi-shop-logo .custom-logo {
        max-width: 150px;
    }

    .amahlosi-shop-nav {
        justify-content: center;
        gap: 16px 22px;
    }
}

@media (max-width: 600px) {
    .amahlosi-shop-nav {
        flex-direction: column;
        gap: 12px;
    }

    .amahlosi-book-btn {
        margin-top: 6px;
    }
}

.amahlosi-shop-nav {
    display: flex;
    align-items: center;
}

.amahlosi-shop-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.amahlosi-shop-menu li {
    margin: 0;
}

.amahlosi-shop-menu li a {
    color: #4a2316;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    position: relative;
}

.amahlosi-shop-menu li a:hover {
    color: #7a4428;
}

.amahlosi-shop-menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: #c89455;
    transition: 0.25s ease;
}

.amahlosi-shop-menu li a:hover::after,
.amahlosi-shop-menu .current-menu-item > a::after {
    width: 100%;
}

/* =========================
   WP HEADER MENU FIX
========================= */

.amahlosi-shop-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.amahlosi-shop-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Target WordPress generated menu */
.amahlosi-shop-nav ul,
.amahlosi-shop-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.amahlosi-shop-nav li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.amahlosi-shop-nav a {
    color: #4a2316;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    position: relative;
}

.amahlosi-shop-nav a:hover {
    color: #7a4428;
}

.amahlosi-shop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: #c89455;
    transition: 0.25s ease;
}

.amahlosi-shop-nav a:hover::after,
.amahlosi-shop-nav .current-menu-item > a::after {
    width: 100%;
}

/* Book button remains separate */
.amahlosi-book-btn {
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%);
    color: #2c180f !important;
    padding: 14px 26px;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(74, 35, 22, 0.16);
    white-space: nowrap;
    text-decoration: none;
    font-weight: 700;
}

.amahlosi-book-btn:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%);
    color: #2c180f !important;
}

/* Mobile */
@media (max-width: 991px) {
    .amahlosi-shop-header-inner {
        flex-direction: column;
        align-items: center;
        padding: 18px 0;
    }

    .amahlosi-shop-nav {
        margin-left: 0;
    }

    .amahlosi-shop-nav ul,
    .amahlosi-shop-menu {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px 22px;
    }
}

@media (max-width: 600px) {
    .amahlosi-shop-nav ul,
    .amahlosi-shop-menu {
        flex-direction: column;
        gap: 12px;
    }
}

/* =========================
   SHOP  HEADER ICONS
========================= */

.amahlosi-shop-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fffaf4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a2316;
    font-size: 16px;
    box-shadow: 0 6px 14px rgba(74, 35, 22, 0.12);
    text-decoration: none;
    transition: 0.25s ease;
}

.shop-icon:hover {
    background: #c89455;
    color: #fff;
}

/* Cart badge */
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #c89455;
    color: #2c180f;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================
   BRAND BUTTON
========================= */

.btn-brand {
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%);
    color: #2c180f !important;
    font-weight: 700;
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    box-shadow: 0 10px 22px rgba(74, 35, 22, 0.16);
    text-decoration: none;
    display: inline-block;
    transition: 0.25s ease;
}

.btn-brand:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%);
    color: #2c180f !important;
}
/* CTA inside menu */
.menu-cta {
    padding: 10px 22px;
    border-radius: 999px;
    margin-left: 12px;
    display: inline-block;
    line-height: normal;
}

/* Prevent underline effect on CTA */
.amahlosi-shop-menu .menu-cta::after {
    display: none !important;
}

/* Force button styles onto the link instead of li */
.amahlosi-shop-menu li.btn-brand > a {
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%);
    color: #2c180f !important;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(74, 35, 22, 0.16);
    transition: 0.25s ease;
}

/* Hover */
.amahlosi-shop-menu li.btn-brand > a:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%);
    color: #2c180f !important;
}

/* Remove underline effect */
.amahlosi-shop-menu li.btn-brand > a::after {
    display: none !important;
}

/* Remove weird spacing from li */
.amahlosi-shop-menu li.btn-brand {
    margin-left: 10px;
}

/* =========================
   WOOCOMMERCE SHOP PRODUCTS
========================= */

.woocommerce-products-header {
    text-align: center;
    padding: 60px 0 35px;
}

.woocommerce-products-header__title {
    color: #4a2316;
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.storefront-sorting {
    margin-bottom: 35px;
}

ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

ul.products::before,
ul.products::after {
    display: none !important;
}

ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    background: #fffaf4;
    border: 1px solid rgba(74, 35, 22, 0.1);
    border-radius: 22px;
    padding: 18px !important;
    box-shadow: 0 12px 28px rgba(74, 35, 22, 0.08);
    transition: 0.25s ease;
    text-align: center;
    overflow: hidden;
}

ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(74, 35, 22, 0.16);
}

ul.products li.product img {
    border-radius: 18px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 18px;
}

ul.products li.product .woocommerce-loop-product__title {
    color: #4a2316;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    min-height: 48px;
}

ul.products li.product .price {
    color: #7a4428 !important;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

ul.products li.product .button,
ul.products li.product .added_to_cart {
    width: 100%;
    border-radius: 999px !important;
    padding: 12px 18px !important;
    font-weight: 700;
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%) !important;
    color: #2c180f !important;
    box-shadow: 0 8px 18px rgba(74, 35, 22, 0.14);
}

ul.products li.product .button:hover,
ul.products li.product .added_to_cart:hover {
    background: linear-gradient(180deg, #ddb77f 0%, #b87b3e 100%) !important;
    color: #2c180f !important;
}

/* Sale badge */
.onsale {
    background: #4a2316 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 6px 12px !important;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1199px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    ul.products {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SINGLE PRODUCT MUSIC BOX
========================= */

.amahlosi-product-music-box {
    margin: 28px 0;
}

.amahlosi-preview-box,
.amahlosi-tracklist-box {
    background: #fffaf4;
    border: 1px solid rgba(74, 35, 22, 0.12);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 12px 28px rgba(74, 35, 22, 0.08);
}

.amahlosi-preview-box h3,
.amahlosi-tracklist-box h3 {
    color: #4a2316;
    font-family: 'Cinzel', serif;
    margin-bottom: 18px;
}

/* Tracklist */

.amahlosi-tracklist {
    margin: 0;
    padding-left: 22px;
}

.amahlosi-tracklist li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(74, 35, 22, 0.10);
    color: #4a2316;
    font-weight: 600;
}

.amahlosi-tracklist li:last-child {
    border-bottom: 0;
}

/* Premium preview player */

.preview-player {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: linear-gradient(180deg, #fffaf4 0%, #fff6ee 100%);
    border: 1px solid rgba(74, 35, 22, 0.10);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(74, 35, 22, 0.08);
    flex-wrap: wrap;
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
}

.preview-player::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: transparent;
    transition: 0.3s ease;
}

.preview-player.is-playing {
    box-shadow: 0 20px 40px rgba(74, 35, 22, 0.16);
    border-color: rgba(200, 148, 85, 0.35);
}

.preview-player.is-playing::before {
    background: linear-gradient(180deg, #7a4428, #c89455);
}

.preview-play-btn {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, #d8ae73 0%, #ba8446 100%);
    color: #2c180f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(74, 35, 22, 0.16);
    transition: 0.25s ease;
}

.preview-play-btn:hover {
    transform: translateY(-2px) scale(1.04);
}

.preview-play-btn i {
    font-size: 18px;
}

.preview-player.is-playing .preview-play-btn {
    background: linear-gradient(180deg, #c89455 0%, #9a6132 100%);
    color: #fff;
}

.preview-main {
    flex: 1;
    min-width: 240px;
}

.preview-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.preview-meta h4 {
    margin: 6px 0 4px;
    font-family: 'Cinzel', serif;
    color: #4a2316;
    font-size: 1.05rem;
}

.preview-meta span {
    font-size: 0.9rem;
    color: #7a4428;
}

.now-playing-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(200, 148, 85, 0.16);
    color: #7a4428;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.preview-player.is-playing .now-playing-badge {
    background: linear-gradient(90deg, #7a4428, #c89455);
    color: #fff;
}

.preview-progress {
    width: 100%;
    height: 8px;
    background: #eadbc9;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
}

.preview-progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #7a4428, #c89455);
    border-radius: 999px;
}

.preview-time {
    margin-top: 8px;
    font-size: 0.86rem;
    color: #6c5145;
}

.preview-audio {
    display: none;
}

.preview-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-width: 40px;
    height: 24px;
    opacity: 0.55;
}

.preview-visualizer span {
    display: block;
    width: 4px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #c89455, #7a4428);
    animation: soundBounce 1s infinite ease-in-out;
    animation-play-state: paused;
}

.preview-visualizer span:nth-child(2) { animation-delay: 0.15s; }
.preview-visualizer span:nth-child(3) { animation-delay: 0.30s; }
.preview-visualizer span:nth-child(4) { animation-delay: 0.45s; }
.preview-visualizer span:nth-child(5) { animation-delay: 0.60s; }

.preview-player.is-playing .preview-visualizer span {
    animation-play-state: running;
}

@keyframes soundBounce {
    0%, 100% { height: 8px; }
    50% { height: 24px; }
}

@media (max-width: 767px) {
    .preview-player {
        align-items: flex-start;
    }

    .preview-play-btn {
        width: 52px;
        height: 52px;
    }

    .preview-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}