/* ========================================
   ALIGNMENT FIXES - Add to your style.css
   ======================================== */

/* ===================================
   FIX #1: BREADCRUMB STYLING
   =================================== */
.breadcrumb {
    background: #f9fafb;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #6b7280;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--dark-color);
    font-weight: 500;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================
   FIX #2: PRODUCT BADGE POSITIONING
   =================================== */

/* Ensure product card has relative positioning */
.product-card {
    position: relative; /* ← This is critical! */
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

/* Product image wrapper also needs relative positioning */
.product-image {
    position: relative; /* ← This too! */
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-gray);
}

/* Fix badge positioning - ABSOLUTE inside product card */
.product-badge {
    position: absolute; /* ← Must be absolute */
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    /* Remove any margin or float */
    margin: 0;
    float: none;
}

/* Badge color variants */
.product-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.product-badge.popular {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.product-badge.premium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ===================================
   FIX #3: ENSURE PROPER CARD STRUCTURE
   =================================== */

/* Product card should not have any floating children */
.product-card > * {
    float: none;
    clear: both;
}

/* Image should fill the container properly */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block; /* Remove any inline spacing */
}

/* ===================================
   FIX #4: GRID LAYOUT FIXES
   =================================== */

/* Ensure products grid doesn't break */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   FIX #5: CLEAR ANY CONFLICTING STYLES
   =================================== */

/* Remove any default positioning that might interfere */
.product-card .product-badge {
    position: absolute !important; /* Force absolute positioning */
    top: 1rem !important;
    left: 1rem !important;
}

/* Ensure the first element in product card is the image */
.product-card .product-image {
    order: 1;
}

.product-card .product-info {
    order: 2;
}
