/* ==========================================================================
   Carley Connection — Shop Page
   ========================================================================== */

/* ---------- Shop Hero ---------- */
.cc-shop-hero {
    background-color: #e8ece8;
    padding: clamp(4rem, 8vw, 8rem) 0;
    text-align: center;
}

.cc-shop-hero__eyebrow {
    color: #203f43;
    display: block;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.5em;
    font-size: 12px;
    font-weight: 400;
}

.cc-shop-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 96px);
    font-weight: 400;
    color: #203f43;
    margin-bottom: var(--space-xl);
    line-height: 1;
}

.cc-shop-hero__desc {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    color: #3f4848;
    max-width: 55ch;
    margin-inline: auto;
    line-height: 1.5;
}

/* ---------- Shop Layout ---------- */
.cc-shop__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

/* ---------- Sidebar ---------- */
.cc-shop__sidebar {
    position: sticky;
    top: 90px;
    background-color: #fffcfb;
    padding: var(--space-xl);
    border-radius: var(--radius-sm);
}

.cc-filter-group {
    margin-bottom: var(--space-xl);
}

.cc-filter-group__title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 300;
    color: #1a1c1b;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.cc-filter-group__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Checkbox filter */
.cc-filter-group__checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-light);
    cursor: pointer;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.cc-filter-group__checkbox:hover {
    color: var(--color-primary-dark);
}

.cc-filter-group__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-filter-group__check {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-border);
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-fast);
}

.cc-filter-group__checkbox:hover .cc-filter-group__check {
    border-color: var(--color-primary-dark);
}

.cc-filter-group__checkbox input:checked + .cc-filter-group__check {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.cc-filter-group__checkbox input:checked + .cc-filter-group__check::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.cc-filter-group__label {
    flex: 1;
}

.cc-filter-group__count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-left: auto;
}

/* ---------- Toolbar (full-width bar between hero and content) ---------- */
.cc-shop__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-2xl);
}

.cc-shop__count {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #203f43;
    margin: 0;
}

.cc-shop__sort .woocommerce-ordering {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cc-shop__sort .woocommerce-ordering::before {
    content: 'SORT BY:';
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.cc-shop__sort select {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 300;
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-2xl) var(--space-sm) 0;
    background: transparent url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%231A1A1A' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right center;
    appearance: none;
    cursor: pointer;
    color: var(--color-text);
}

/* ---------- Product Grid ---------- */
.cc-shop__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl) var(--space-xl);
}

/* Shop-specific product card overrides — matching Figma exactly */
.cc-shop__grid .cc-product-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: white;
}

.cc-shop__grid .cc-product-card__image {
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #3a7b7b 0%, #1a4a4a 100%);
    border-radius: 0;
    position: relative;
}

.cc-shop__grid .cc-product-card__image img {
    mix-blend-mode: normal;
}

/* Auction overlay — time left + current bid at bottom of image */
.cc-shop__grid .cc-product-card__auction-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    border-top: none;
    margin-top: 0;
}

.cc-shop__grid .cc-product-card__auction-meta .cc-product-card__time-left {
    font-size: 11px;
    font-weight: 600;
}

.cc-shop__grid .cc-product-card__auction-meta .cc-product-card__time-left::before {
    content: 'TIME LEFT  ';
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    display: block;
}

/* Wishlist button repositioned */
.cc-shop__grid .cc-product-card .cc-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.cc-shop__grid .cc-product-card__body {
    padding: var(--space-lg) var(--space-md) var(--space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-xs);
}

.cc-shop__grid .cc-product-card__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 300;
    flex: 1;
    min-width: 0;
}

.cc-shop__grid .cc-product-card__price {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    flex-shrink: 0;
}

.cc-shop__grid .cc-product-card__tailor {
    width: 100%;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    order: -1;
}

/* Live Auction badge — top right of card image */
.cc-shop__grid .cc-product-card__image .cc-badge--live {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    font-size: 8px;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    background-color: var(--color-accent);
    color: var(--color-text);
}

.cc-shop__grid .cc-product-card__image .cc-badge--live::before {
    display: none;
}

/* Auction time+bid overlay at bottom of image */
.cc-product-card__auction-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
}

.cc-product-card__auction-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(8px);
}

.cc-product-card__auction-label {
    display: block;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.cc-product-card__auction-time .cc-product-card__time-left {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.cc-product-card__auction-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-hover);
}

/* "ADD TO BAG" overlay — appears on hover at bottom of image (regular products only) */
.cc-shop__grid .cc-product-card__add-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(32, 63, 67, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 4;
}

.cc-shop__grid .cc-product-card:hover .cc-product-card__add-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Hide "ADD TO BAG" on auction cards — they use the auction overlay instead */
.cc-shop__grid .cc-product-card--auction .cc-product-card__add-overlay {
    display: none;
}

.cc-shop__grid .cc-product-card__add-overlay span {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
}

/* Auction overlay — expands on hover to show "PLACE BID" */
.cc-product-card__auction-overlay {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-product-card__auction-bid-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background-color: #203f43;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-product-card__auction-bid-btn span {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
    white-space: nowrap;
}

.cc-product-card:hover .cc-product-card__auction-bid-btn {
    max-height: 44px;
    padding: 12px;
    opacity: 1;
}

/* Material/origin label below card */
.cc-shop__grid .cc-product-card__material {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #57a5b1;
    margin-top: 2px;
}

/* Wishlist heart — top-left, appears on hover */
.cc-product-card__heart {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.cc-product-card:hover .cc-product-card__heart {
    opacity: 1;
    transform: scale(1);
}

.cc-product-card__heart:hover {
    background: white;
    color: var(--color-live);
}

.cc-product-card__heart:hover svg {
    fill: currentColor;
}

/* Loading state */
.cc-shop__grid-area {
    transition: opacity 0.2s ease;
}

/* ---------- Pagination ---------- */
.woocommerce-pagination {
    margin-top: var(--space-3xl);
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: var(--space-sm);
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--text-sm);
    color: var(--color-text);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.woocommerce-pagination ul li a:hover {
    border-color: var(--color-primary-dark);
    color: var(--color-primary-dark);
}

.woocommerce-pagination ul li span.current {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
}

.cc-shop__empty {
    text-align: center;
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    padding: var(--space-4xl) 0;
}

/* ---------- Shop Storytelling — "The Hands That Build Our World" ---------- */
.cc-shop-story {
    background-color: #203f43;
    padding: 128px 0;
}

.cc-shop-story__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: center;
}

.cc-shop-story__title {
    font-family: var(--font-heading);
    font-size: 60px;
    font-weight: 400;
    font-style: italic;
    color: #fbf9f1;
    line-height: 1.25;
    margin-bottom: 48px;
}

.cc-shop-story__desc {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 300;
    color: rgba(251, 249, 241, 0.7);
    line-height: 1.625;
    max-width: 512px;
    margin-bottom: 0;
}

.cc-shop-story__link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 32px;
}

.cc-shop-story__link a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 4.2px;
    color: #facb58;
    text-decoration: none;
}

.cc-shop-story__link-line {
    width: 48px;
    height: 1px;
    background-color: #facb58;
}

/* Media — main image with inset overlay */
.cc-shop-story__media {
    position: relative;
}

.cc-shop-story__main-image {
    overflow: hidden;
    height: 680px;
}

.cc-shop-story__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.cc-shop-story__inset-image {
    position: absolute;
    bottom: -48px;
    left: -48px;
    width: 256px;
    height: 320px;
    background: white;
    padding: 8px;
}

.cc-shop-story__inset-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .cc-shop__layout {
        grid-template-columns: 200px 1fr;
        gap: var(--space-xl);
    }
    .cc-shop__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cc-shop-story__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .cc-shop-story__title {
        font-size: 36px;
    }
    .cc-shop-story__main-image {
        height: 400px;
    }
    .cc-shop-story__inset-image {
        position: static;
        width: 100%;
        height: 200px;
        margin-top: 16px;
    }
    .cc-shop__layout {
        grid-template-columns: 1fr;
    }
    .cc-shop__sidebar {
        position: static;
        display: flex;
        gap: var(--space-xl);
        overflow-x: auto;
        padding-bottom: var(--space-md);
        border-bottom: 1px solid var(--color-border-light);
        margin-bottom: var(--space-xl);
    }
    .cc-filter-group {
        margin-bottom: 0;
        min-width: 160px;
        flex-shrink: 0;
    }
    .cc-shop__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .cc-shop__grid {
        grid-template-columns: 1fr;
    }
}
