/* ===============================
   MODERN CART CSS (FINAL UI)
================================ */
.pf-cart-container {
    max-width: 1200px; margin: 40px auto; padding: 0 20px;
    font-family: inherit; color: #111;
}

/* --- HEADER & CLEAR CART --- */
.pf-cart-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px;
}
.pf-cart-title {
    font-size: 28px; font-weight: 800; margin: 0;
}

/* Dark Red Clear Cart Button */
.pf-clear-cart-btn {
    background: #fff5f5; /* Very light red bg */
    border: 1px solid #fecaca; /* Light red border */
    color: #991b1b; /* Dark red text */
    padding: 8px 16px; border-radius: 6px; cursor: pointer;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 6px; 
    transition: all 0.2s ease;
}
.pf-clear-cart-btn:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}

/* --- EMPTY CART --- */
.pf-empty-cart { text-align: center; padding: 80px 20px; background: #f9fafb; border-radius: 12px; }
.pf-empty-icon { color: #d1d5db; margin-bottom: 20px; }
.pf-empty-cart h2 { margin: 0 0 10px; font-size: 24px; }
.pf-empty-cart p { color: #6b7280; margin-bottom: 30px; }
.pf-return-shop { display: inline-block; width: auto; padding: 12px 30px; }

/* --- GRID LAYOUT --- */
.pf-cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px; /* Cart Items | Sidebar */
    gap: 40px;
    align-items: start; /* CRITICAL FOR STICKY SIDEBAR */
}

/* --- CART ITEMS TABLE --- */
.pf-cart-items {
    border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff;
}
.pf-cart-table-header {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 15px 20px; background: #f9fafb; border-bottom: 1px solid #e5e7eb;
    font-weight: 600; font-size: 13px; color: #6b7280; text-transform: uppercase;
}
.pf-cart-row {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 20px; border-bottom: 1px solid #f3f4f6; align-items: center;
}
.pf-cart-row:last-child { border-bottom: none; }

/* Product Info */
.pf-col-product { display: flex; align-items: center; gap: 20px; }
.pf-prod-img { width: 80px; height: 80px; flex-shrink: 0; }
.pf-prod-img img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb;
}
.pf-prod-details h3 { font-size: 15px; margin: 0 0 5px; font-weight: 600; line-height: 1.3; }
.pf-prod-details h3 a { color: #111; text-decoration: none; }
.pf-mobile-price { display: none; font-size: 13px; color: #6b7280; font-weight: 500; margin-top: 4px; }

/* --- QUANTITY INPUTS (CLEAN DESIGN) --- */
.pf-qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    height: 36px;
    background: #fff;
    overflow: hidden;
}
.pf-qty-btn {
    width: 32px;
    height: 100%;
    background: #f9fafb;
    border: none;
    font-size: 16px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pf-qty-btn:hover { background: #e5e7eb; }
.pf-qty-wrapper input {
    width: 40px;
    height: 100%;
    border: none;
    border-left: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    padding: 0;
    -moz-appearance: textfield; /* Remove browser arrows */
}
.pf-qty-wrapper input:focus { outline: none; }
.pf-qty-wrapper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Columns */
.pf-col-price { font-size: 15px; color: #4b5563; font-weight: 500; }
.pf-col-total { font-size: 16px; color: #111; font-weight: 700; }
.pf-remove-link {
    font-size: 22px; color: #d1d5db; text-decoration: none; padding: 0 10px; line-height: 1; transition: color 0.2s;
}
.pf-remove-link:hover { color: #ef4444; }

/* Footer Row (Coupon) */
.pf-cart-footer-row { padding: 20px; background: #fff; }
.pf-cart-coupon { display: flex; gap: 10px; max-width: 400px; }
.pf-cart-coupon input { flex: 1; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0 15px; height: 42px; }
.pf-cart-coupon button { background: #111; color: #fff; border: none; border-radius: 8px; padding: 0 20px; font-weight: 600; cursor: pointer; }

/* --- SIDEBAR SUMMARY (STICKY DESKTOP) --- */
.pf-cart-summary {
    position: sticky;
    top: 20px; /* Sticks 20px from top */
    z-index: 10;
}
.pf-summary-box {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.pf-summary-box h2 { font-size: 18px; margin: 0 0 20px; padding-bottom: 15px; border-bottom: 1px solid #f3f4f6; }
.pf-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: #4b5563; }
.pf-summary-total {
    display: flex; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 2px solid #e5e7eb;
    font-size: 20px; font-weight: 800; color: #111;
}
.pf-btn-primary {
    display: block; width: 100%; background: #111; color: #fff; text-align: center; padding: 16px;
    border-radius: 8px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; margin-top: 20px;
    transition: background 0.2s;
}
.pf-btn-primary:hover { background: #000; }
.pf-trust-badges { text-align: center; margin-top: 15px; font-size: 12px; color: #6b7280; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .pf-cart-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .pf-cart-table-header { display: none; } /* Hide Header */
    
    .pf-cart-row {
        display: flex; flex-wrap: wrap; position: relative;
        padding-bottom: 20px;
    }
    
    /* Image and Details */
    .pf-col-product { width: 100%; margin-bottom: 15px; }
    .pf-prod-details { padding-right: 30px; /* Space for X */ }
    .pf-mobile-meta { display: block; }
    
    .pf-col-price.desktop-only { display: none; }
    
    /* Qty & Total aligned */
    .pf-col-qty { width: 50%; }
    .pf-col-total { width: 50%; text-align: right; font-size: 16px; align-self: center; }
    
    /* Remove X */
    .pf-col-remove { position: absolute; top: 20px; right: 0; }

    /* Coupon */
    .pf-cart-coupon { max-width: 100%; }

    /* Disable Sticky on Mobile (User preference usually, but can keep if wanted. 
       Usually sticky sidebar on mobile covers content, so we let it flow naturally.) */
    .pf-cart-summary { position: static; }
    .pf-summary-box { box-shadow: none; border: 1px solid #e5e7eb; }
}


/* 1. Fix the Gap between Qty and Subtotal */
.pf-col-total {
    padding-left: 40px !important; /* Forces the gap you wanted */
    font-weight: bold;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 2. Style the new Sidebar Coupon */
.pf-sidebar-coupon {
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; /* Light line separator */
}

.pf-coupon-group {
    display: flex;
    gap: 8px;
}

.pf-coupon-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pf-coupon-group button {
    background: #333;
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
}


/* --- Empty Cart Layout --- */
.pf-empty-cart {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

/* Illustration Area */
.pf-empty-illustration {
    margin-bottom: 30px;
}

.pf-empty-illustration svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05)); /* Soft shadow for depth */
}

/* Typography */
.pf-empty-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
}

.pf-empty-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* "Shop Now" Button Styling */
.pf-btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Space between text and arrow */
    background: #111; /* Dark professional color */
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pf-btn-shop-now:hover {
    background: #333;
    transform: translateY(-3px); /* Slight lift effect */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: #fff;
}

.pf-btn-shop-now svg {
    transition: transform 0.3s ease;
}

.pf-btn-shop-now:hover svg {
    transform: translateX(5px); /* Arrow moves forward on hover */
}

/* Simple Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}