/* ============================================================
   Annique Products Plugin — style.css
   ============================================================ */

/* Grid layout */
.ap-grid {
    display: grid;
    gap: 24px;
    margin: 0 0 32px;
    list-style: none;
    padding: 0;
}
.ap-columns-2 { grid-template-columns: repeat(2, 1fr); }
.ap-columns-3 { grid-template-columns: repeat(3, 1fr); }
.ap-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .ap-columns-3,
    .ap-columns-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .ap-columns-2,
    .ap-columns-3,
    .ap-columns-4 { grid-template-columns: 1fr; }
}

/* Card */
.ap-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}
.ap-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Square image */
.ap-image-link {
    display: block;
    text-decoration: none;
    position: relative;
}
.ap-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ap-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}
.ap-card:hover .ap-image-wrap img {
    transform: scale(1.04);
}

/* Promo badge — top-right corner of image, anchored to .ap-image-link */
.ap-promo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 6px 10px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}
.ap-promo-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ap-promo-pct {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Card body */
.ap-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Title */
.ap-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}
.ap-title a {
    color: inherit;
    text-decoration: none;
}
.ap-title a:hover {
    color: #df3550;
}

/* Star rating — single row, yellow, no border, no background, no extra text */
.ap-rating .star-rating {
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 1em;
    width: 5.4em;
    font-family: star;
}
.ap-rating .star-rating::before {
    content: "\53\53\53\53\53";
    color: #ddd;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}
.ap-rating .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}
.ap-rating .star-rating span::before {
    content: "\53\53\53\53\53";
    color: #ffbc00;
    top: 0;
    position: absolute;
    left: 0;
}

/* ============================================================
   Flip-clock Offer Badge
   ============================================================ */
.ap-badge-wrap {
    width: 100%;
}

.annique-offer-badge {
    background: #111;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    width: 100%;
    box-sizing: border-box;
}

.aob-header {
    color: #df3550;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.aob-tiles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.aob-tile {
    background: linear-gradient(180deg, #2a2a2a 50%, #1a1a1a 50%);
    border-radius: 6px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid #333;
    position: relative;
}

/* Flip-clock split line */
.aob-tile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.6);
    transform: translateY(-50%);
}

.aob-digit {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(223, 53, 80, 0.4);
}

.aob-label {
    color: #df3550;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 4px;
}

.aob-expires {
    color: #888;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

/* ============================================================
   Benefits (tags)
   ============================================================ */
.ap-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ap-benefits-label {
    font-size: 0.72rem;
    color: #555;
    font-weight: 600;
    margin-right: 2px;
}
.ap-tag {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: background 0.15s;
}
.ap-tag:hover {
    background: #c8e6c9;
    color: #1b5e20;
}

/* ============================================================
   Price
   ============================================================ */
.ap-price {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: auto;
}
.ap-price .price del {
    color: #aaa;
    font-weight: 400;
    font-size: 0.85em;
    margin-right: 4px;
}
.ap-price .price ins {
    color: #df3550;
    text-decoration: none;
}

/* ============================================================
   Add to cart
   ============================================================ */
.ap-atc {
    margin-top: 4px;
}
.ap-add-to-cart {
    display: block;
    width: 100%;
    text-align: center;
    background: #df3550 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.1s ease;
}
.ap-add-to-cart:hover {
    background: #c0243f !important;
    transform: translateY(-1px);
}
.ap-out-of-stock {
    display: block;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    padding: 8px 0;
}

/* ============================================================
   Pagination
   ============================================================ */
.ap-pagination {
    margin-top: 24px;
    text-align: center;
}
.ap-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.ap-pagination .page-numbers li {
    margin: 0;
}
.ap-pagination .page-numbers a,
.ap-pagination .page-numbers span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.ap-pagination .page-numbers a:hover {
    background: #df3550;
    border-color: #df3550;
    color: #fff;
}
.ap-pagination .page-numbers .current {
    background: #df3550;
    border-color: #df3550;
    color: #fff;
}

/* No products */
.ap-no-products {
    text-align: center;
    color: #888;
    padding: 40px 0;
}
