/* 260105.03: Frontend display styles - Editorial layouts */

.abw-bestsellers {
    margin: 20px 0;
}

.abw-bestsellers a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Shared: Price Badge
   ======================================== */
.abw-price-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #111;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 0 0 0 8px;
}

/* ========================================
   Layout 1: Editorial Grid
   ======================================== */
.abw-layout-editorial {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.abw-layout-editorial .abw-product {
    display: block;
    text-align: center;
}

.abw-layout-editorial .abw-product-image {
    display: block;
    position: relative;
    margin-bottom: 15px;
}

.abw-layout-editorial .abw-product-image img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.abw-layout-editorial .abw-product-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #111;
    line-height: 1.4;
}

.abw-layout-editorial .abw-product:hover .abw-product-title {
    color: #666;
}

/* ========================================
   Layout 2: Cards
   ======================================== */
.abw-layout-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.abw-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.abw-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.abw-card-image {
    display: block;
    padding: 20px;
    background: #fafafa;
}

.abw-card-image img {
    width: 100%;
    height: 120px;
    object-fit: contain;
}

.abw-card-content {
    display: block;
    padding: 15px;
}

.abw-card-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #111;
    line-height: 1.4;
    margin-bottom: 8px;
}

.abw-card-price {
    display: block;
    font-size: 13px;
    color: #666;
}

/* ========================================
   Layout 3: Horizontal
   ======================================== */
.abw-layout-horizontal {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.abw-horizontal-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.abw-horizontal-item:last-child {
    border-bottom: none;
}

.abw-horizontal-item:hover .abw-horizontal-title {
    color: #666;
}

.abw-horizontal-image {
    flex-shrink: 0;
    width: 80px;
}

.abw-horizontal-image img {
    width: 100%;
    height: 80px;
    object-fit: contain;
}

.abw-horizontal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.abw-horizontal-title {
    font-weight: 600;
    font-size: 15px;
    color: #111;
    line-height: 1.4;
    transition: color 0.2s;
}

.abw-horizontal-price {
    font-size: 14px;
    color: #666;
}

/* ========================================
   Layout 4: Stacked
   ======================================== */
.abw-layout-stacked {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.abw-stacked-item {
    display: block;
    text-align: center;
}

.abw-stacked-item:hover .abw-stacked-title {
    color: #666;
}

.abw-stacked-image {
    display: block;
    position: relative;
    margin-bottom: 12px;
}

.abw-stacked-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.abw-stacked-title {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #111;
    line-height: 1.4;
    transition: color 0.2s;
}

/* ========================================
   Disclaimer
   ======================================== */
.abw-bestsellers-disclaimer {
    font-size: 7pt;
    color: #999;
    text-align: left;
    line-height: 1.4;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    clear: both;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .abw-layout-editorial,
    .abw-layout-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .abw-layout-editorial,
    .abw-layout-cards {
        grid-template-columns: 1fr;
    }

    .abw-horizontal-item {
        flex-direction: column;
        text-align: center;
    }

    .abw-horizontal-image {
        width: 100px;
    }

    .abw-horizontal-content {
        align-items: center;
    }
}

/* ========================================
   Layout 5: Classic (from Clickport)
   260106: Migrated product box design
   ======================================== */

.abw-layout-classic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
}

.abw-layout-classic .abw-classic-card {
    background: white;
    border: 1px solid #e7e7e7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Source Serif 4', Georgia, serif;
}

.abw-layout-classic .abw-classic-header {
    background: transparent;
    color: #333;
    font-family: 'Fira Sans', Arial, sans-serif;
    font-size: 18px;
    text-align: center;
    padding: 12px 8px;
    font-weight: 600;
}

.abw-layout-classic .abw-classic-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
}

.abw-layout-classic .abw-classic-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.abw-layout-classic .abw-classic-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f1111;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 15px;
    line-height: 1.3;
    height: 48px;
    overflow: hidden;
}

.abw-layout-classic .abw-classic-title a {
    color: inherit;
    text-decoration: none;
}

.abw-layout-classic .abw-classic-title a:hover {
    color: #007185;
}

.abw-layout-classic .abw-classic-price {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 15px;
}

.abw-layout-classic .abw-classic-button {
    text-align: center;
    padding: 0 15px 20px;
}

.abw-layout-classic .abw-classic-button a {
    display: inline-block;
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 0;
}

.abw-layout-classic .abw-classic-button a:hover {
    color: #007185;
}

/* Classic layout responsive */
@media (max-width: 900px) {
    .abw-layout-classic {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .abw-layout-classic {
        grid-template-columns: 1fr;
    }
}
