/* ============================================
   RESPONSIVE PRODUCT & ITEM CARDS
   ============================================ */

.product-grid,
.items-grid,
.cards-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}

/* Mobile: single column */
@media (max-width: 575.98px) {
    .product-grid,
    .items-grid,
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

/* Tablet: 2 columns */
@media (min-width: 576px) and (max-width: 767.98px) {
    .product-grid,
    .items-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* iPad/Medium: 3 columns */
@media (min-width: 768px) and (max-width: 991.98px) {
    .product-grid,
    .items-grid,
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop: 4 columns */
@media (min-width: 992px) {
    .product-grid,
    .items-grid,
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Large Desktop: 5 columns */
@media (min-width: 1400px) {
    .product-grid,
    .items-grid,
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Auto-fit (responsive without media queries) */
.product-grid-auto,
.items-grid-auto {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   PRODUCT CARD RESPONSIVE
   ============================================ */

.product-card,
.item-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover,
.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Product Image Wrapper */
.product-image-wrapper,
.item-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-wrapper img,
.item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-wrapper img,
.item-card:hover .item-image-wrapper img {
    transform: scale(1.05);
}

/* Product Badge */
.product-badge,
.item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF6B35;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* Product Info */
.product-info,
.item-info {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name,
.item-name {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark, #2D3748);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description,
.item-description {
    font-size: clamp(0.8rem, 1.5vw, 0.875rem);
    color: var(--text-light, #718096);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Price */
.product-price,
.item-price {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    color: var(--primary-blue, #0F4C97);
    margin-bottom: 0.5rem;
}

.product-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* Product Rating */
.product-rating,
.item-rating {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    margin-bottom: 0.75rem;
}

.star {
    color: #FFC107;
    margin-right: 2px;
}

/* Product Actions */
.product-actions,
.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions button,
.item-actions button {
    flex: 1;
    padding: 0.5rem;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    border-radius: 0.375rem;
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE ROW/COLUMN LAYOUTS
   ============================================ */

.row-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .row-responsive {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.col-responsive {
    flex: 1;
}

@media (max-width: 767.98px) {
    .col-responsive {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE LIST/TABLE
   ============================================ */

.list-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 576px) {
    .list-item {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .list-item {
        grid-template-columns: 100px 1fr auto auto auto;
    }
}

/* ============================================
   RESPONSIVE SIDEBAR LAYOUT
   ============================================ */

.sidebar-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .sidebar-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
}

/* Sidebar */
.sidebar {
    order: 2;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 992px) {
    .sidebar {
        order: 1;
    }
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark, #2D3748);
}

/* Main Content */
.main-content {
    order: 1;
}

@media (min-width: 992px) {
    .main-content {
        order: 2;
    }
}

/* ============================================
   RESPONSIVE FORM LAYOUT
   ============================================ */

.form-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .form-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .form-layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-layout.full {
    grid-column: 1 / -1;
}

/* ============================================
   RESPONSIVE HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 300px;
    padding: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(135deg, #0F4C97, #1dd3b0);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: clamp(3rem, 8vw, 6rem);
    }
}

@media (min-width: 992px) {
    .hero-section {
        min-height: 500px;
    }
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   RESPONSIVE BREADCRUMB
   ============================================ */

.breadcrumb {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

/* ============================================
   RESPONSIVE PAGINATION
   ============================================ */

.pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.page-link {
    padding: 0.5rem 0.75rem;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
}

@media (max-width: 575.98px) {
    .pagination {
        display: flex;
        gap: 0.25rem;
    }

    .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .page-item.disabled .page-link,
    .page-link.disabled {
        display: none;
    }
}

/* ============================================
   RESPONSIVE ALERTS
   ============================================ */

.alert {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
    font-size: clamp(0.85rem, 1vw, 1rem);
    word-wrap: break-word;
}

/* ============================================
   RESPONSIVE SECTIONS
   ============================================ */

.section {
    padding: clamp(1.5rem, 5vw, 3rem) 0;
}

.section.hero {
    padding: clamp(2rem, 8vw, 5rem) 0;
}

.section.compact {
    padding: clamp(1rem, 3vw, 1.5rem) 0;
}

/* ============================================
   RESPONSIVE DIVIDER
   ============================================ */

.divider {
    height: 1px;
    background: #E2E8F0;
    margin: clamp(1rem, 3vw, 2rem) 0;
}

.divider.vertical {
    width: 1px;
    height: 100%;
    display: inline-block;
    margin: 0 clamp(0.5rem, 2vw, 1rem);
}

/* ============================================
   RESPONSIVE BADGES & TAGS
   ============================================ */

.badge-responsive {
    display: inline-block;
    padding: clamp(0.25rem, 0.5vw, 0.5rem) clamp(0.5rem, 1vw, 0.75rem);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    border-radius: 12px;
    white-space: nowrap;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vw, 1rem);
}

/* ============================================
   RESPONSIVE COMPARISON TABLE
   ============================================ */

.comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
}

.comparison-table table {
    font-size: clamp(0.8rem, 1vw, 0.95rem);
}

/* ============================================
   RESPONSIVE SLIDER/CAROUSEL
   ============================================ */

.carousel-responsive {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-item {
    width: 100%;
    aspect-ratio: 16 / 9;
}

@media (max-width: 767.98px) {
    .carousel-item {
        aspect-ratio: 4 / 3;
    }
}

/* ============================================
   RESPONSIVE STATS/KPI
   ============================================ */

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    background: white;
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-number {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-blue, #0F4C97);
}

.stat-label {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--text-light, #718096);
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE TIMELINE
   ============================================ */

.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #E2E8F0;
}

@media (max-width: 767.98px) {
    .timeline::before {
        left: 30px;
    }
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--primary-blue, #0F4C97);
    border-radius: 50%;
    border: 3px solid white;
}

@media (max-width: 767.98px) {
    .timeline-item {
        padding-left: 80px;
        margin-bottom: 1.5rem;
    }

    .timeline-item::before {
        left: 30px;
    }

    .timeline-content {
        text-align: left;
    }
}

@media (min-width: 768px) {
    .timeline-item:nth-child(odd) .timeline-content {
        text-align: right;
        padding-right: 50px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
        padding-left: 50px;
    }
}
