/* ========================================
   Born to Be Academy - Reusable Components
   ======================================== */

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-accent {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-600);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-gray-50);
}

.btn-white-outline {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-white-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    height: 38px;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-gray-900);
}

.card-text {
    color: var(--color-gray-600);
    font-size: var(--text-sm);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    width: 100%;
}

/* Price Tags */
.price {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-secondary);
}

.price-original {
    font-size: var(--text-sm);
    color: var(--color-gray-400);
    text-decoration: line-through;
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.badge-new {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge-hot {
    background: var(--color-secondary);
    color: var(--color-white);
}

.badge-sale {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: var(--color-white);
}

/* Section Styling */
.section {
    padding: var(--space-4xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title h2 {
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    color: var(--color-gray-600);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto;
}

/* Star Rating */
.stars {
    display: flex;
    gap: 2px;
    color: #FFC107;
}

.stars i {
    font-size: var(--text-sm);
}

/* Avatar */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-white);
    box-shadow: var(--shadow-md);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-muted {
    color: var(--color-gray-500);
}

/* Spacing Utilities */
.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   Mobile Responsive - Components
   ======================================== */

@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }

    .section-title {
        margin-bottom: var(--space-xl);
    }

    .section-title h2 {
        font-size: var(--text-2xl);
    }

    .section-title p {
        font-size: var(--text-base);
    }

    .btn {
        min-height: 44px;
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--text-sm);
    }

    .btn-sm {
        min-height: 38px;
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }

    .card:hover {
        transform: none;
    }

    .card-content {
        padding: var(--space-md);
    }

    .card-title {
        font-size: var(--text-lg);
    }

    .card-footer {
        padding: var(--space-sm) var(--space-md);
    }

    .price {
        font-size: var(--text-xl);
    }
}

@media (max-width: 380px) {
    .footer-actions {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Skeleton Loading Animation
   ======================================== */

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.skeleton-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--color-gray-200) 0%, var(--color-gray-100) 50%, var(--color-gray-200) 100%);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: var(--color-gray-200);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

.skeleton-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.skeleton-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skeleton-btn {
    height: 38px;
    border-radius: var(--radius-lg);
    background: var(--color-gray-100);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}