From 6a763bbfdac8eeb6e6953cbc198f2dd4900f73ed Mon Sep 17 00:00:00 2001 From: George Birikorang Date: Wed, 10 Sep 2025 02:47:45 -0700 Subject: [PATCH] feat: enhance product detail layout with responsive design adjustments and new utility classes --- product-detail.html | 18 +- styles/main.css | 456 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 466 insertions(+), 8 deletions(-) diff --git a/product-detail.html b/product-detail.html index d72c2a1..84a2724 100644 --- a/product-detail.html +++ b/product-detail.html @@ -256,11 +256,13 @@
-
+
-
+
-
+
@@ -301,7 +303,7 @@
-
+

Asgaard sofa @@ -386,7 +388,7 @@

-
+
diff --git a/styles/main.css b/styles/main.css index ce412e7..893dcd5 100644 --- a/styles/main.css +++ b/styles/main.css @@ -728,6 +728,11 @@ video { margin-right: auto; } +.-mx-5 { + margin-left: -1.25rem; + margin-right: -1.25rem; +} + .-mt-1 { margin-top: -0.25rem; } @@ -828,6 +833,14 @@ video { margin-top: 1.5rem; } +.mt-8 { + margin-top: 2rem; +} + +.-mb-2 { + margin-bottom: -0.5rem; +} + .box-border { box-sizing: border-box; } @@ -864,6 +877,10 @@ video { display: none; } +.aspect-square { + aspect-ratio: 1 / 1; +} + .h-10 { height: 2.5rem; } @@ -964,6 +981,18 @@ video { height: 100vh; } +.h-14 { + height: 3.5rem; +} + +.h-64 { + height: 16rem; +} + +.h-\[56px\] { + height: 56px; +} + .max-h-\[90vh\] { max-height: 90vh; } @@ -976,6 +1005,14 @@ video { min-height: 100vh; } +.min-h-\[48px\] { + min-height: 48px; +} + +.min-h-\[56px\] { + min-height: 56px; +} + .w-12 { width: 3rem; } @@ -1076,6 +1113,10 @@ video { min-width: 2rem; } +.min-w-\[96px\] { + min-width: 96px; +} + .max-w-2xl { max-width: 42rem; } @@ -1112,6 +1153,10 @@ video { max-width: 20rem; } +.max-w-none { + max-width: none; +} + .flex-1 { flex: 1 1 0%; } @@ -1165,10 +1210,22 @@ video { grid-template-columns: repeat(6, minmax(0, 1fr)); } +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.flex-row { + flex-direction: row; +} + .flex-col { flex-direction: column; } +.flex-col-reverse { + flex-direction: column-reverse; +} + .flex-wrap { flex-wrap: wrap; } @@ -1229,6 +1286,14 @@ video { gap: 2rem; } +.gap-3 { + gap: 0.75rem; +} + +.gap-y-2 { + row-gap: 0.5rem; +} + .space-x-10 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(2.5rem * var(--tw-space-x-reverse)); @@ -1351,6 +1416,10 @@ video { border-radius: 0.75rem; } +.rounded-\[12px\] { + border-radius: 12px; +} + .border { border-width: 1px; } @@ -1664,6 +1733,11 @@ video { padding-bottom: 2rem; } +.px-0 { + padding-left: 0px; + padding-right: 0px; +} + .pb-16 { padding-bottom: 4rem; } @@ -1720,6 +1794,10 @@ video { padding-top: 5rem; } +.pb-2 { + padding-bottom: 0.5rem; +} + .text-left { text-align: left; } @@ -1784,6 +1862,10 @@ video { line-height: 1rem; } +.text-\[18px\] { + font-size: 18px; +} + .font-bold { font-weight: 700; } @@ -2239,10 +2321,34 @@ video { } @media (min-width: 640px) { + .sm\:order-1 { + order: 1; + } + + .sm\:order-2 { + order: 2; + } + .sm\:mt-28 { margin-top: 7rem; } + .sm\:mb-6 { + margin-bottom: 1.5rem; + } + + .sm\:mb-8 { + margin-bottom: 2rem; + } + + .sm\:mb-12 { + margin-bottom: 3rem; + } + + .sm\:mt-0 { + margin-top: 0px; + } + .sm\:flex { display: flex; } @@ -2259,13 +2365,129 @@ video { height: 7rem; } + .sm\:h-24 { + height: 6rem; + } + + .sm\:h-\[64px\] { + height: 64px; + } + + .sm\:h-32 { + height: 8rem; + } + + .sm\:h-\[500px\] { + height: 500px; + } + + .sm\:min-h-\[64px\] { + min-height: 64px; + } + + .sm\:w-24 { + width: 6rem; + } + + .sm\:w-32 { + width: 8rem; + } + + .sm\:w-\[180px\] { + width: 180px; + } + + .sm\:w-\[300px\] { + width: 300px; + } + + .sm\:w-\[320px\] { + width: 320px; + } + + .sm\:w-\[420px\] { + width: 420px; + } + + .sm\:w-\[380px\] { + width: 380px; + } + + .sm\:w-\[440px\] { + width: 440px; + } + + .sm\:w-\[500px\] { + width: 500px; + } + + .sm\:max-w-md { + max-width: 28rem; + } + .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .sm\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .sm\:flex-row { + flex-direction: row; + } + + .sm\:flex-col { + flex-direction: column; + } + + .sm\:gap-4 { + gap: 1rem; + } + + .sm\:gap-6 { + gap: 1.5rem; + } + + .sm\:gap-8 { + gap: 2rem; + } + + .sm\:space-y-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); + } + + .sm\:overflow-visible { + overflow: visible; + } + + .sm\:rounded-\[15px\] { + border-radius: 15px; + } + .sm\:pt-28 { padding-top: 7rem; } + + .sm\:pb-0 { + padding-bottom: 0px; + } + + .sm\:text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; + } + + .sm\:text-\[20px\] { + font-size: 20px; + } + + .sm\:text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; + } } @media (min-width: 768px) { @@ -2273,10 +2495,46 @@ video { top: 24rem; } + .md\:mt-10 { + margin-top: 2.5rem; + } + + .md\:mb-0 { + margin-bottom: 0px; + } + + .md\:mb-12 { + margin-bottom: 3rem; + } + + .md\:mb-8 { + margin-bottom: 2rem; + } + .md\:h-\[484px\] { height: 484px; } + .md\:h-28 { + height: 7rem; + } + + .md\:h-32 { + height: 8rem; + } + + .md\:h-\[500px\] { + height: 500px; + } + + .md\:h-\[64px\] { + height: 64px; + } + + .md\:min-h-\[64px\] { + min-height: 64px; + } + .md\:w-32 { width: 8rem; } @@ -2297,6 +2555,38 @@ video { width: 240px; } + .md\:w-28 { + width: 7rem; + } + + .md\:w-\[460px\] { + width: 460px; + } + + .md\:w-\[500px\] { + width: 500px; + } + + .md\:w-\[180px\] { + width: 180px; + } + + .md\:w-\[380px\] { + width: 380px; + } + + .md\:w-\[440px\] { + width: 440px; + } + + .md\:w-20 { + width: 5rem; + } + + .md\:max-w-md { + max-width: 28rem; + } + .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -2309,10 +2599,36 @@ video { flex-direction: row; } + .md\:flex-col { + flex-direction: column; + } + .md\:gap-12 { gap: 3rem; } + .md\:gap-8 { + gap: 2rem; + } + + .md\:gap-4 { + gap: 1rem; + } + + .md\:gap-6 { + gap: 1.5rem; + } + + .md\:space-y-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); + } + + .md\:overflow-visible { + overflow: visible; + } + .md\:pr-0 { padding-right: 0px; } @@ -2321,6 +2637,10 @@ video { padding-top: 10rem; } + .md\:pb-0 { + padding-bottom: 0px; + } + .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -2350,6 +2670,15 @@ video { font-size: 1.25rem; line-height: 1.75rem; } + + .md\:text-\[20px\] { + font-size: 20px; + } + + .md\:text-base { + font-size: 1rem; + line-height: 1.5rem; + } } @media (min-width: 1024px) { @@ -2377,6 +2706,43 @@ video { grid-column: span 2 / span 2; } + .lg\:mx-0 { + margin-left: 0px; + margin-right: 0px; + } + + .lg\:mb-12 { + margin-bottom: 3rem; + } + + .lg\:mb-8 { + margin-bottom: 2rem; + } + + .lg\:mb-0 { + margin-bottom: 0px; + } + + .lg\:mt-0 { + margin-top: 0px; + } + + .lg\:h-32 { + height: 8rem; + } + + .lg\:h-\[500px\] { + height: 500px; + } + + .lg\:h-\[64px\] { + height: 64px; + } + + .lg\:min-h-\[64px\] { + min-height: 64px; + } + .lg\:w-36 { width: 9rem; } @@ -2397,6 +2763,38 @@ video { width: 16rem; } + .lg\:w-32 { + width: 8rem; + } + + .lg\:w-\[380px\] { + width: 380px; + } + + .lg\:w-\[440px\] { + width: 440px; + } + + .lg\:w-\[500px\] { + width: 500px; + } + + .lg\:w-auto { + width: auto; + } + + .lg\:w-\[180px\] { + width: 180px; + } + + .lg\:w-20 { + width: 5rem; + } + + .lg\:max-w-md { + max-width: 28rem; + } + .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -2409,6 +2807,18 @@ video { grid-template-columns: repeat(4, minmax(0, 1fr)); } + .lg\:flex-row { + flex-direction: row; + } + + .lg\:flex-col { + flex-direction: column; + } + + .lg\:items-start { + align-items: flex-start; + } + .lg\:gap-12 { gap: 3rem; } @@ -2417,6 +2827,33 @@ video { gap: 4rem; } + .lg\:gap-6 { + gap: 1.5rem; + } + + .lg\:gap-8 { + gap: 2rem; + } + + .lg\:gap-4 { + gap: 1rem; + } + + .lg\:space-y-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); + } + + .lg\:overflow-visible { + overflow: visible; + } + + .lg\:px-0 { + padding-left: 0px; + padding-right: 0px; + } + .lg\:pr-2 { padding-right: 0.5rem; } @@ -2425,6 +2862,10 @@ video { padding-top: 12rem; } + .lg\:pb-0 { + padding-bottom: 0px; + } + .lg\:text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -2454,4 +2895,19 @@ video { font-size: 1.25rem; line-height: 1.75rem; } + + .lg\:text-\[20px\] { + font-size: 20px; + } + + .lg\:text-base { + font-size: 1rem; + line-height: 1.5rem; + } +} + +@media (min-width: 1280px) { + .xl\:flex-col { + flex-direction: column; + } }