/* Amazon Cards - Main Styles */
/* ============================================ */

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main Container */
.box-cards-sec {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.box-cards-grid.d-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Single Amazon Card */
.box-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e7e7e7;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.box-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ff9900;
}

/* Card Header */
.box-card-header {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f2;
    background: #fff;
}

.box-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F1111;
    margin: 0;
    line-height: 1.3;
}

/* Card Body */
.box-card-body {
    padding: 15px;
    flex-grow: 1;
}

/* Grid Rows */
.box-grid-row {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.box-grid-row:last-child {
    margin-bottom: 0;
}

/* Individual Quadrants */
.box-quadrant-container {
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e7e7e7;
}

.box-quadrant-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ff9900;
}

.box-quadrant-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.box-image-container {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f8f8f8;
}

.amazon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.box-quadrant-link:hover .amazon-image {
    transform: scale(1.05);
}

.amazon-image-label {
    background: #fff;
    padding: 8px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.amazon-label-text {
    font-size: 12px;
    font-weight: 500;
    color: #0F1111;
    line-height: 1.3;
    display: block;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #0F1111;
    margin-bottom: 20px;
    text-align: left;
}

/* Spacing Utilities */
.pt-20 {
    padding-top: 20px;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Desktop (992px and up) - 4 columns */
@media (min-width: 992px) {
    .box-cards-grid.d-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .box-grid-row {
        flex-direction: row;
    }
}

/* Tablet (768px to 991px) - 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .box-cards-grid.d-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .box-card {
        max-width: 100%;
    }

    .box-image-container {
        height: 100px;
    }

    .box-card-title {
        font-size: 15px;
    }

    .amazon-label-text {
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }
}

/* Mobile Landscape (576px to 767px) - 2 columns, smaller */
@media (min-width: 576px) and (max-width: 767px) {
    .box-cards-grid.d-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .box-card-header {
        padding: 10px 12px;
    }

    .box-card-title {
        font-size: 14px;
    }

    .box-card-body {
        padding: 12px;
    }

    .box-image-container {
        height: 90px;
    }

    .amazon-image-label {
        padding: 6px;
    }

    .amazon-label-text {
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

/* Mobile Portrait (up to 575px) - 1 column */
@media (max-width: 575px) {
    .box-cards-grid.d-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .box-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .box-card-header {
        padding: 10px 12px;
    }

    .box-card-title {
        font-size: 15px;
        text-align: center;
    }

    .box-card-body {
        padding: 12px;
    }

    .box-grid-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .box-quadrant-container {
        flex: 0 0 calc(50% - 4px);
    }

    .box-image-container {
        height: 120px;
    }

    .amazon-image-label {
        padding: 8px 6px;
    }

    .amazon-label-text {
        font-size: 13px;
        min-height: 2.5em;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .box-cards-sec {
        padding: 0 15px;
    }
}

/* Extra Small Mobile (up to 374px) */
@media (max-width: 374px) {
    .box-card {
        max-width: 100%;
    }

    .box-quadrant-container {
        flex: 0 0 100%;
    }

    .box-image-container {
        height: 100px;
    }

    .box-card-title {
        font-size: 14px;
    }

    .amazon-label-text {
        font-size: 12px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* Accessibility */
.box-quadrant-link:focus {
    outline: 2px solid #ff9900;
    outline-offset: 2px;
}

/* Loading State */
.box-image-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}
