/**
 * ==============================================================================
 * Custom Platform Stylesheet (Custom Storefront Extensions)
 * Relocated from internal <style> blocks into assets/css/custom.css
 * ==============================================================================
 */

/* ------------------------------------------------------------------------------
   1. Shared Catalog, Card & Product Media Styles
   ------------------------------------------------------------------------------ */
.product-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-wrap {
    margin-bottom: 20px;
}

/* ------------------------------------------------------------------------------
   2. Homepage Styles (index.php)
   ------------------------------------------------------------------------------ */
.single-product .product-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.single-product .product-thumb img {
    width: 100%;
    height: 68px;
    object-fit: cover;
}

.product-wrap .product-media {
    overflow: hidden;
}

.product-wrap .product-media img {
    width: 100%;
    height: 243px;
    object-fit: cover;
}

.product-widget .product-media img {
    width: 105px;
    height: 118px;
    object-fit: cover;
}

.category-media img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.top-category-card {
    background-color: #fff;
    border-radius: .5rem;
    overflow: hidden;
    text-align: center;
    height: 100%;
}

.top-category-card .category-media {
    display: block;
}

.top-category-card .category-content {
    padding: 1.5rem 1rem 1.2rem;
}

.top-category-card .category-name {
    margin-bottom: .7rem;
}

.post-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* ------------------------------------------------------------------------------
   3. Single Product Detail Page (product.php)
   ------------------------------------------------------------------------------ */
.product-single .product-image img {
    max-height: 500px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.product-thumb img {
    height: 100px;
    object-fit: cover;
}

/* Stacked Action Layout */
.product-action-stacked {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 2rem;
}

.product-action-stacked .product-qty {
    margin-bottom: 1.5rem !important;
}

.btn-cart-stacked,
.btn-wishlist-stacked {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-cart-stacked {
    background-color: #4B0082;
    border: 1px solid #4B0082;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(75, 0, 130, 0.25);
}

.btn-cart-stacked:hover {
    background-color: #380061;
    border-color: #380061;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(75, 0, 130, 0.35);
}

.btn-cart-stacked.btn-disabled,
.btn-cart-stacked:disabled {
    background-color: #e1e1e1;
    border-color: #e1e1e1;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-wishlist-stacked {
    background-color: #ffffff;
    border: 1px solid #cccccc;
    color: #333333;
    text-decoration: none;
}

.btn-wishlist-stacked:hover {
    color: #e3342f !important;
    border-color: #e3342f !important;
    background-color: #fff0f0 !important;
    text-decoration: none;
}

.btn-wishlist-stacked.added {
    color: #e3342f !important;
    border-color: #e3342f !important;
    background-color: #fff0f0 !important;
}

/* ------------------------------------------------------------------------------
   4. Vendor Storefront (vendor-store.php)
   ------------------------------------------------------------------------------ */
.vendor-banner-container {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.vendor-banner-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    opacity: 0.6;
}

.vendor-profile-overlay {
    position: relative;
    margin-top: -60px;
    padding: 0 30px 25px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.vendor-logo-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: #fff;
}

.vendor-info-box {
    color: #ffffff;
    flex: 1;
}

.vendor-info-box h2 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 4px;
}

.vendor-meta-badge {
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 6px;
}

.vendor-banner-container ~ * .product-media img,
.vendor-profile-overlay ~ * .product-media img {
    height: 240px;
    object-fit: cover;
}

/* ------------------------------------------------------------------------------
   5. Wishlist (wishlist.php)
   ------------------------------------------------------------------------------ */
.wishlist-table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.wishlist-table .product-thumbnail {
    text-align: center;
}

.wishlist-table .product-thumbnail > div,
.wishlist-table .product-thumbnail .p-relative {
    display: inline-block !important;
    width: 80px !important;
    max-width: 80px !important;
    position: relative !important;
    margin: 0 auto !important;
}

.wishlist-table .btn-close {
    top: -8px !important;
    right: -8px !important;
}

.stock-status.in-stock {
    color: #28a745;
    font-weight: 600;
}

.stock-status.out-stock {
    color: #dc3545;
    font-weight: 600;
}

/* ------------------------------------------------------------------------------
   6. Track Order (track-order.php)
   ------------------------------------------------------------------------------ */
.tracker-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
}

.tracker-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin: 40px 0 20px;
}

.tracker-steps::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 12.5%;
    right: 12.5%;
    height: 4px;
    background: #e9ecef;
    z-index: 1;
}

.tracker-progress-line {
    position: absolute;
    top: 27px;
    left: 12.5%;
    height: 4px;
    background: #336699;
    z-index: 2;
    transition: width 0.4s ease, height 0.4s ease;
}

.tracker-step {
    position: relative;
    z-index: 3;
    text-align: center;
    flex: 1;
}

.tracker-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.tracker-step.completed .tracker-icon {
    background: #336699;
    color: #fff;
}

.tracker-step.active .tracker-icon {
    background: #28a745;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(40,167,69,0.4);
}

.tracker-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tracker-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.tracker-step.active .tracker-title {
    color: #28a745;
}

.tracker-desc {
    font-size: 12px;
    color: #777;
}

.order-meta-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

@media (max-width: 767px) {
    .tracker-steps {
        flex-direction: column;
        align-items: flex-start;
        margin: 25px 0 10px;
        padding-left: 0;
    }
    .tracker-steps::before {
        top: 27px;
        bottom: 27px;
        left: 27px;
        right: auto;
        width: 4px;
        height: auto;
    }
    .tracker-progress-line {
        top: 27px;
        left: 27px;
        width: 4px !important;
        height: var(--mobile-height, 0%);
        right: auto;
    }
    .tracker-step {
        display: flex;
        align-items: center;
        text-align: left;
        margin-bottom: 25px;
        width: 100%;
    }
    .tracker-step:last-child {
        margin-bottom: 0;
    }
    .tracker-icon {
        margin-bottom: 0;
        margin-right: 16px;
        flex-shrink: 0;
    }
    .tracker-text {
        align-items: flex-start;
    }
}

@media (min-width: 768px) {
    .tracker-progress-line {
        width: var(--desktop-width, 0%);
        height: 4px !important;
    }
}

/* ------------------------------------------------------------------------------
   7. About Us (about-us.php)
   ------------------------------------------------------------------------------ */
.about-card {
    height: 100%;
    padding: 2.5rem 2rem;
    border: 1px solid #eee;
    border-radius: 1rem;
    background-color: #fff;
}

.about-card .icon-box-icon {
    margin-bottom: 1.2rem;
    font-size: 2.4rem;
    color: #336699;
}

.category-pill {
    display: inline-block;
    margin: 0 .8rem .8rem 0;
    padding: .8rem 1.4rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    color: #333;
    transition: all .2s ease;
}

.category-pill:hover {
    border-color: #4B0082;
    color: #4B0082;
}
