
/* =========================================================
   HAMTACO SHOP — GLOBAL RESPONSIVE LAYER
   Added without changing PHP/business logic.
   ========================================================= */

html, body { max-width: 100%; }
*, *::before, *::after { max-width: 100%; }
img, video, iframe { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
table { max-width: 100%; }

/* Prevent long technical strings from breaking mobile layout */
.part-number, .order-number, .customer-mobile, code, pre {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Shared storefront */
@media (max-width: 950px) {
    .header-inner { gap: 12px; }
    .brand { min-width: 0; }
    .shop-section { width: 100%; }
}

@media (max-width: 700px) {
    .header-inner { height: 72px; }
    .mobile-nav { top: 72px; }
    .hero-content, .shop-section, .page-hero { max-width: 100%; }
    .section-heading { gap: 10px; }
    .big-search { width: 100%; }
    .product-card, .category-card { min-width: 0; }
    .product-bottom { min-width: 0; }
    .product-bottom .btn { width: 100%; }
    .footer-grid, .footer-bottom { width: 100%; }
}

@media (max-width: 430px) {
    .header-inner { padding-left: 12px; padding-right: 12px; }
    .brand-main { font-size: 24px; }
    .shop-section { padding-left: 12px; padding-right: 12px; }
}

/* Standalone account pages */
@media (max-width: 600px) {
    .page {
        width: 100% !important;
        min-height: 100vh;
        padding: 12px !important;
    }

    .login-box, .register-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .login-box .content, .register-box .content {
        padding: 20px !important;
    }

    .login-box .header, .register-box .header {
        padding: 22px 18px !important;
    }

    .login-box h1, .register-box h1 {
        font-size: 22px !important;
    }

    .login-box input, .register-box input,
    .login-box button, .register-box button {
        width: 100%;
        min-height: 46px;
    }

    .bottom {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}

/* Standalone customer profile */
@media (max-width: 800px) {
    .container { width: calc(100% - 24px) !important; }
    .topbar { flex-wrap: wrap; gap: 12px; }
    .top-links { flex-wrap: wrap; }
    .grid { grid-template-columns: 1fr !important; }
    .card { min-width: 0; }
    .info-row { gap: 10px; }
}

@media (max-width: 480px) {
    .container { width: calc(100% - 18px) !important; }
    .topbar { padding: 14px !important; }
    .top-links a { padding: 7px 9px !important; font-size: 11px !important; }
    .welcome h1 { font-size: 22px !important; }
    .info-row { flex-direction: column; align-items: flex-start !important; }
}

/* Checkout */
@media (max-width: 800px) {
    .container {
        width: calc(100% - 20px) !important;
        max-width: 700px !important;
    }

    .grid { grid-template-columns: 1fr !important; }
    .row { grid-template-columns: 1fr !important; }
    .box { padding: 18px !important; }

    .item {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .item-price {
        align-self: flex-end;
    }

    .summary-row { gap: 12px; }
    .summary-row span, .summary-row strong { overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
    .container { width: calc(100% - 14px) !important; }
    .box { padding: 14px !important; }
    .field input, .field textarea, .btn { font-size: 14px !important; }
}

/* Cart */
@media (max-width: 700px) {
    .cart-page { padding-top: 25px; }
    .cart-box-header { padding: 18px; }
    .cart-item { padding: 17px; }
    .cart-product-name { overflow-wrap: anywhere; }
    .cart-quantity { flex-wrap: wrap; }
    .cart-summary { padding: 18px; }
    .cart-actions .btn { width: 100%; }
}

/* Accessibility / touch targets */
@media (pointer: coarse) {
    .desktop-nav a, .mobile-nav a, .btn, button,
    .cart-remove, .text-link {
        min-height: 44px;
    }

    .mobile-nav a {
        display: flex;
        align-items: center;
    }
}
