/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text);
    font-weight: 500;
}

/* ========== PAGE HEADER (rounded hero panel, shared by every inner page) ========== */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 450px;
    margin: 20px;
    width: calc(100% - 40px);
    max-width: calc(var(--container, 1400px) + 100%);
    padding: 60px 0;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #F5E6D3 0%, #E9CDB0 100%);
    box-shadow: var(--shadow);
}

/* readability scrim: warm cream fading out towards the artwork */
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(255, 247, 237, 0.92) 0%, rgba(255, 247, 237, 0.6) 45%, rgba(255, 247, 237, 0) 75%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container, 1400px);
    margin: 0 auto;
    padding: 0 40px;
}

.page-header .breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-header .breadcrumb a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.page-header .breadcrumb span {
    color: var(--text-light);
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.1;
}

.page-header p {
    color: var(--text-light);
    max-width: 640px;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* The background artwork */
.pages-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    z-index: 0;
}

/* ========== FEATURES BAR ========== */
.features-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px); /* Glassmorphism blur */
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 60%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-item i {
    font-size: 1.8rem;
    color: #F97316; /* Dark green icons */
}

.feature-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.2;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    background: var(--white);
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Shared content refinement */
.form-group input, .form-group select, .form-group textarea { border-radius: 5px; border-color: var(--border-light); }

/* Toast notifications */
.tb-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    min-width: 260px;
    max-width: 400px;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.15);
    font-weight: 500;
    font-size: 0.92rem;
    animation: tbToastIn .3s ease;
}
.tb-toast.flash-success { background: #F1F5F9; color: #C2410C; border-left: 4px solid #C2410C; }
.tb-toast.flash-error { background: #ffebee; color: #b71c1c; border-left: 4px solid #c62828; }
.tb-toast.flash-info { background: #e3f2fd; color: #0d47a1; border-left: 4px solid #1976d2; }
@keyframes tbToastIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product card text truncation (home / shop / related): one line each */
.product-card h3,
.product-card .product-title,
.product-card .product-info h3 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-width: 100%;
    line-height: 1.35;
}
.product-card .product-meta,
.product-card .product-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== FLASH MESSAGES (page banners) ========== */
.flash-message {
    position: relative;
    padding: 14px 20px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 200;
}
.flash-message .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.flash-message p { margin: 0; flex: 1; }
.flash-message .flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
    padding: 4px 8px;
    color: inherit;
}
.flash-message .flash-close:hover { opacity: 1; }
.flash-message.flash-success {
    background: #F1F5F9;
    color: #C2410C;
    border-bottom: 3px solid #C2410C;
}
.flash-message.flash-error {
    background: #ffebee;
    color: #b71c1c;
    border-bottom: 3px solid #c62828;
}
.flash-message.flash-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-bottom: 3px solid #1976d2;
}
.flash-message.flash-warning {
    background: #fff8e1;
    color: #f57f17;
    border-bottom: 3px solid #ffc107;
}


/* =====================================================
   PREMIUM TICKER / MARQUEE BAR (below hero)
   ===================================================== */

.ticker-bar {
    position: relative;
    width: 100%;
    background: #f8f9fa; /* Light gray background matching the image */
    overflow: hidden;
    padding: 12px 0; /* Slightly tighter padding */
    border-bottom: none; /* Removed the orange border */
    isolation: isolate;
    margin-bottom: 32px;
    margin-top: 32px;
}

.ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: tickerScroll 38s linear infinite;
    will-change: transform;
}

.ticker-bar:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding: 0 28px;
    color: #334155; /* Dark slate gray text, instead of orange */
    font-size: 0.82rem;
    font-weight: 600; /* Slightly lighter font weight */
    letter-spacing: 0.05em; /* Reduced letter spacing */
    text-transform: none; /* Removed uppercase to match sentence case in image */
    white-space: nowrap;
    font-family: inherit;
    transition: color 0.25s ease;
}

@keyframes tickerScroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
        min-height: auto;
    }
    .page-header h1 {
        font-size: 2.2rem;
    }
    .features-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
    }
    .pages-bg-img {
        opacity: 0.2;
    }
    .ticker-bar {
        padding: 10px 0;
        border-top: none; /* Removed the mobile orange top border */
    }
    .ticker-item {
        font-size: 0.75rem;
        gap: 20px;
        padding: 0 20px;
        letter-spacing: 0.05em;
    }
}
/* ========== WISHLIST / ACTION TOAST (single definition, used site-wide) ========== */
.wishlist-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 22px;
    border-radius: var(--radius);
    background: var(--secondary-light);
    color: var(--white);
    font-size: .9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s ease, opacity .3s ease, background .3s ease;
    z-index: 9999;
}

.wishlist-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.wishlist-toast.success { background: var(--primary); }
.wishlist-toast.error   { background: var(--danger); }

@media (max-width: 640px) {
    .wishlist-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
    }
}

/* ========== SECTION HEADER (shared) ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 1.8rem;
}

.section-header p {
    color: var(--text-light);
    margin-top: 6px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
}

.section-link:hover {
    gap: 10px;
}

/* ========== STAR RATING (product cards) ========== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.product-rating i {
    color: var(--warning);
    font-size: 0.75rem;
}

.product-rating i.off,
.product-rating i.fa-star.off {
    color: var(--border);
}

.product-rating span {
    color: var(--text-muted);
}

/* ========== QUANTITY SELECTOR (cart + product) ========== */
.qty-selector {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
}

/* ========== SWATCH FILL ==========
   The colour itself comes from the database and is passed in as the single
   custom property --swatch; every other style lives here. */
.swatch-fill {
    background: var(--swatch, var(--border));
}

.swatch-fill.is-light {
    border: 1px solid var(--border);
}

/* ========== COLOUR SWATCHES (shop filter + product page) ========== */
.color-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.color-swatch:hover,
.color-swatch.active {
    border-color: var(--primary);
    transform: scale(1.15);
}

/* ========== ORDER SUMMARY SIDEBAR (cart + checkout) ========== */
.order-summary {
    position: sticky;
    top: 120px;
}

@media (max-width: 900px) {
    .order-summary {
        position: static;
        width: 100%;
    }
}

.product-wishlist.active { color: var(--danger); }

/* ========== SMALL UTILITIES ========== */
.u-hidden { display: none; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
