/* 
    Custom Cart Pro Styling - Version 4.0
    Complete cart page customization with mobile optimization
*/

/* ============================================
   HIDE THEME ELEMENTS
   ============================================ */

body.custom-cart-page header,
body.custom-cart-page footer,
body.custom-cart-page .site-header,
body.custom-cart-page .site-footer,
body.custom-cart-page #masthead,
body.custom-cart-page #colophon,
body.custom-cart-page .header,
body.custom-cart-page .footer,
body.custom-cart-page nav,
body.custom-cart-page .navbar,
body.custom-cart-page .menu,
body.custom-cart-page .navigation {
    display: none !important;
}

/* ============================================
   BASE STYLING
   ============================================ */

body.custom-cart-page {
    background-color: #f8f9fa !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.custom-cart-page * {
    box-sizing: border-box;
}

/* ============================================
   WRAPPER
   ============================================ */

.custom-cart-wrapper {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================
   CUSTOM HEADER
   ============================================ */

.custom-cart-header {
    background: #ffffff;
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.custom-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.custom-logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.custom-logo span {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.custom-cart-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex-grow: 1;
    width: 100%;
}

.custom-cart-title h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.custom-cart-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 991px) {
    .custom-cart-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CART ITEMS
   ============================================ */

.custom-cart-items {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 16px;
}

.custom-cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 120px 40px;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.custom-cart-item:last-child {
    border-bottom: none;
}

.product-thumbnail {
    display: flex;
    justify-content: center;
}

.product-thumbnail img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.product-thumbnail a {
    display: flex;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.product-name a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 16px;
}

.product-name a:hover {
    color: #27ae60;
}

.product-price {
    color: #666;
    font-size: 14px;
}

.product-quantity {
    display: flex;
    align-items: center;
}

.product-quantity .quantity {
    display: flex;
    align-items: center;
}

.product-quantity input[type="number"],
.product-quantity .qty {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.product-subtotal {
    font-weight: 700;
    color: #1a1a1a;
    text-align: right;
    font-size: 16px;
}

.product-remove {
    display: flex;
    justify-content: center;
}

.product-remove .remove {
    color: #ff4d4f;
    font-size: 24px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.product-remove .remove:hover {
    background: #fff1f0;
    color: #ff7875;
}

/* ============================================
   CART ACTIONS
   ============================================ */

.cart-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.coupon {
    display: flex;
    gap: 10px;
    flex: 1;
}

.coupon input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 1;
    font-size: 14px;
}

.button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.coupon .button {
    background: #f0f0f0;
    color: #333;
    white-space: nowrap;
}

.coupon .button:hover {
    background: #e0e0e0;
}

.update-cart-btn {
    background: #1a1a1a;
    color: #fff;
    white-space: nowrap;
}

.update-cart-btn:hover {
    background: #333;
}

/* ============================================
   SUMMARY COLUMN
   ============================================ */

.custom-cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    height: fit-content;
}

.cart_totals {
    width: 100%;
}

.cart_totals h2 {
    font-size: 20px;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    color: #1a1a1a;
}

.shop_table_responsive {
    width: 100%;
    border-collapse: collapse;
}

.shop_table_responsive tr {
    border-bottom: 1px solid #f0f0f0;
}

.shop_table_responsive tr:last-child {
    border-bottom: none;
}

.shop_table_responsive th,
.shop_table_responsive td {
    padding: 15px 0;
    text-align: left;
}

.shop_table_responsive th {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.shop_table_responsive td {
    font-size: 14px;
}

.cart-subtotal td,
.cart-tax td,
.shipping td {
    color: #666;
}

.order-total th,
.order-total td {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 20px 0;
    border-top: 2px solid #f0f0f0;
}

.order-total td {
    text-align: right;
}

.wc-proceed-to-checkout {
    margin-top: 25px;
}

.checkout-button {
    display: block;
    width: 100%;
    background: #27ae60 !important;
    color: #fff !important;
    text-align: center;
    padding: 18px !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.checkout-button:hover {
    background: #219150 !important;
}

/* ============================================
   CUSTOM FOOTER
   ============================================ */

.custom-cart-footer {
    background: #ffffff;
    padding: 50px 40px;
    border-top: 1px solid #eee;
    text-align: center;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

.footer-logo .site-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.footer-copyright {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* ============================================
   MOBILE RESPONSIVE - TABLETS (768px - 991px)
   ============================================ */

@media (max-width: 991px) {
    .custom-cart-header {
        padding: 15px 20px;
    }

    .custom-logo img {
        max-height: 45px;
    }

    .custom-cart-content {
        margin: 30px auto;
        padding: 0 15px;
    }

    .custom-cart-title h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .custom-cart-items {
        padding: 20px;
    }

    .custom-cart-item {
        grid-template-columns: 90px 1fr 100px 35px;
        gap: 15px;
        padding: 15px 0;
    }

    .product-thumbnail img {
        width: 90px;
        height: 90px;
    }

    .product-name {
        font-size: 15px;
    }

    .product-quantity input[type="number"],
    .product-quantity .qty {
        width: 50px;
        padding: 6px;
        font-size: 13px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .coupon {
        width: 100%;
        flex-direction: column;
    }

    .coupon input,
    .coupon .button {
        width: 100%;
    }

    .custom-cart-footer {
        padding: 40px 20px;
    }

    .footer-logo img {
        max-height: 40px;
    }

    .footer-logo .site-name {
        font-size: 18px;
    }
}

/* ============================================
   MOBILE RESPONSIVE - PHONES (max 767px)
   ============================================ */

@media (max-width: 767px) {
    .custom-cart-header {
        padding: 12px 15px;
    }

    .custom-logo img {
        max-height: 40px;
    }

    .custom-logo h1,
    .custom-logo span {
        font-size: 18px;
    }

    .custom-cart-content {
        margin: 20px auto;
        padding: 0 12px;
    }

    .custom-cart-title h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .custom-cart-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .custom-cart-items {
        padding: 15px;
    }

    .custom-cart-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .custom-cart-item:last-child {
        border-bottom: none;
    }

    .product-thumbnail {
        width: 100%;
        justify-content: flex-start;
    }

    .product-thumbnail img {
        width: 80px;
        height: 80px;
    }

    .product-info {
        width: 100%;
        gap: 6px;
    }

    .product-name {
        font-size: 14px;
        font-weight: 600;
    }

    .product-name a {
        font-size: 14px;
    }

    .product-price {
        font-size: 13px;
    }

    .product-quantity {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    .product-quantity input[type="number"],
    .product-quantity .qty {
        width: 50px;
        padding: 6px;
        font-size: 12px;
    }

    .product-subtotal {
        width: 100%;
        text-align: left;
        font-size: 15px;
        padding-top: 8px;
    }

    .product-remove {
        width: 100%;
        justify-content: flex-start;
    }

    .product-remove .remove {
        font-size: 20px;
        width: 28px;
        height: 28px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    .coupon {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .coupon input {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .coupon .button,
    .update-cart-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .custom-cart-summary {
        padding: 20px;
    }

    .cart_totals h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .shop_table_responsive th,
    .shop_table_responsive td {
        padding: 12px 0;
        font-size: 13px;
    }

    .order-total th,
    .order-total td {
        font-size: 16px;
        padding: 15px 0;
    }

    .checkout-button {
        padding: 15px !important;
        font-size: 16px !important;
    }

    .custom-cart-footer {
        padding: 30px 15px;
    }

    .footer-logo {
        margin-bottom: 15px;
    }

    .footer-logo img {
        max-height: 35px;
    }

    .footer-logo .site-name {
        font-size: 16px;
    }

    .footer-copyright {
        font-size: 12px;
    }
}

/* ============================================
   EXTRA SMALL PHONES (max 480px)
   ============================================ */

@media (max-width: 480px) {
    .custom-cart-header {
        padding: 10px 12px;
    }

    .custom-logo img {
        max-height: 35px;
    }

    .custom-logo h1,
    .custom-logo span {
        font-size: 16px;
    }

    .custom-cart-content {
        margin: 15px auto;
        padding: 0 10px;
    }

    .custom-cart-title h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .custom-cart-items {
        padding: 12px;
    }

    .product-thumbnail img {
        width: 70px;
        height: 70px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-price {
        font-size: 12px;
    }

    .product-quantity input[type="number"],
    .product-quantity .qty {
        width: 45px;
        padding: 5px;
        font-size: 11px;
    }

    .product-subtotal {
        font-size: 14px;
    }

    .product-remove .remove {
        font-size: 18px;
        width: 26px;
        height: 26px;
    }

    .coupon input {
        padding: 8px 10px;
        font-size: 12px;
    }

    .coupon .button,
    .update-cart-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .custom-cart-summary {
        padding: 15px;
    }

    .cart_totals h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .shop_table_responsive th,
    .shop_table_responsive td {
        padding: 10px 0;
        font-size: 12px;
    }

    .order-total th,
    .order-total td {
        font-size: 14px;
        padding: 12px 0;
    }

    .checkout-button {
        padding: 12px !important;
        font-size: 14px !important;
    }

    .custom-cart-footer {
        padding: 20px 12px;
    }

    .footer-logo img {
        max-height: 30px;
    }

    .footer-logo .site-name {
        font-size: 14px;
    }

    .footer-copyright {
        font-size: 11px;
    }
}

/* ============================================
   WOOCOMMERCE UTILITIES
   ============================================ */

.woocommerce-info,
.woocommerce-message {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    color: #004085;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.woocommerce-error {
    background: #fff5f5;
    border: 1px solid #ffb3b3;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}
